]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Handle the corner case in vm_fault_quick_hold_pages().
authorKonstantin Belousov <kib@FreeBSD.org>
Fri, 25 Mar 2011 16:38:10 +0000 (16:38 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Fri, 25 Mar 2011 16:38:10 +0000 (16:38 +0000)
commitaf32c4196f9e10899986d52d100af803dad0a771
treee32e00ee6351de0257ca9e2cd7d455cb4286c383
parentbdadacaf664dd7e53675c04585077fb868b5df62
Handle the corner case in vm_fault_quick_hold_pages().

If supplied length is zero, and user address is invalid, function
might return -1, due to the truncation and rounding of the address.
The callers interpret the situation as EFAULT. Instead of handling
the zero length in caller, filter it in vm_fault_quick_hold_pages().

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
sys/vm/vm_fault.c