]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
There are times when a len==0 parameter to mmap is okay. But on a
authordougm <dougm@FreeBSD.org>
Mon, 10 Jun 2019 03:07:10 +0000 (03:07 +0000)
committerdougm <dougm@FreeBSD.org>
Mon, 10 Jun 2019 03:07:10 +0000 (03:07 +0000)
commit39faf7cbc87419a74eec50db921fe02b6245458f
tree072bfa58a1e53d618453b9b4afe672c89f623668
parentc93a14fd8c6e7afcc7861e5ad924c0047530e854
There are times when a len==0 parameter to mmap is okay. But on a
32-bit machine, a len parameter just a few bytes short of 4G, rounded
up to a page boundary and hitting zero then, is not okay. Return
failure in that case.

Reported by: pho
Reviewed by: alc, kib (mentor)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D20580
sys/vm/vm_mmap.c