diff options
author | asomers <asomers@FreeBSD.org> | 2018-02-22 02:14:43 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2018-02-22 02:14:43 +0000 |
commit | 823207b8a7c685bf7364189a41758f15a9ec62ce (patch) | |
tree | 3ac42ec7b83704188590e74d314871f37aaba1b7 /lib/libc | |
parent | 16b95efbb0fa16f25223cf755ee570c9e6d3bfba (diff) | |
download | FreeBSD-src-823207b8a7c685bf7364189a41758f15a9ec62ce.zip FreeBSD-src-823207b8a7c685bf7364189a41758f15a9ec62ce.tar.gz |
MFC r328266:
mlock(2): correct documentation for error conditions.
The man page is years out of date regarding errors. Our implementation _does_
allow unaligned addresses, and it _does_not_ check for negative lengths,
because the length is unsigned. It checks for overflow instead.
Update the tests accordingly.
Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D13826
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/mlock.2 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2 index 4f26420..dda796a 100644 --- a/lib/libc/sys/mlock.2 +++ b/lib/libc/sys/mlock.2 @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd May 17, 2014 +.Dd Jan 22, 2018 .Dt MLOCK 2 .Os .Sh NAME @@ -125,7 +125,7 @@ will fail if: .Va security.bsd.unprivileged_mlock is set to 0 and the caller is not the super-user. .It Bq Er EINVAL -The address given is not page aligned or the length is negative. +The address range given wraps around zero. .It Bq Er EAGAIN Locking the indicated range would exceed the system limit for locked memory. .It Bq Er ENOMEM @@ -143,7 +143,7 @@ will fail if: .Va security.bsd.unprivileged_mlock is set to 0 and the caller is not the super-user. .It Bq Er EINVAL -The address given is not page aligned or the length is negative. +The address range given wraps around zero. .It Bq Er ENOMEM Some or all of the address range specified by the addr and len arguments does not correspond to valid mapped pages in the address space |