svn commit: r266498 - in stable/9: lib/libc/sys sys/vm
Peter Holm
pho at FreeBSD.org
Wed May 21 15:17:23 UTC 2014
Author: pho
Date: Wed May 21 15:17:22 2014
New Revision: 266498
URL: http://svnweb.freebsd.org/changeset/base/266498
Log:
MFC r265534:
msync(2) must return ENOMEM and not EINVAL when the address is outside the
allowed range or when one or more pages are not mapped. This according to
The Open Group Base Specifications Issue 7.
Sponsored by: EMC / Isilon storage division
Modified:
stable/9/lib/libc/sys/msync.2
stable/9/sys/vm/vm_mmap.c
Directory Properties:
stable/9/ (props changed)
stable/9/lib/ (props changed)
stable/9/lib/libc/ (props changed)
stable/9/lib/libc/sys/ (props changed)
stable/9/sys/ (props changed)
Modified: stable/9/lib/libc/sys/msync.2
==============================================================================
--- stable/9/lib/libc/sys/msync.2 Wed May 21 13:36:04 2014 (r266497)
+++ stable/9/lib/libc/sys/msync.2 Wed May 21 15:17:22 2014 (r266498)
@@ -87,11 +87,13 @@ The
.Fa addr
argument
is not a multiple of the hardware page size.
-.It Bq Er EINVAL
-The
+.It Bq Er ENOMEM
+The addresses in the range starting at
+.Fa addr
+and continuing for
.Fa len
-argument
-is too large or negative.
+bytes are outside the range allowed for the address space of a
+process or specify one or more pages that are not mapped.
.It Bq Er EINVAL
The
.Fa flags
@@ -99,7 +101,7 @@ argument
was both MS_ASYNC and MS_INVALIDATE.
Only one of these flags is allowed.
.It Bq Er EIO
- An error occurred while writing at least one of the pages in
+An error occurred while writing at least one of the pages in
the specified region.
.El
.Sh SEE ALSO
Modified: stable/9/sys/vm/vm_mmap.c
==============================================================================
--- stable/9/sys/vm/vm_mmap.c Wed May 21 13:36:04 2014 (r266497)
+++ stable/9/sys/vm/vm_mmap.c Wed May 21 15:17:22 2014 (r266498)
@@ -540,7 +540,7 @@ sys_msync(td, uap)
case KERN_SUCCESS:
return (0);
case KERN_INVALID_ADDRESS:
- return (EINVAL); /* Sun returns ENOMEM? */
+ return (ENOMEM);
case KERN_INVALID_ARGUMENT:
return (EBUSY);
case KERN_FAILURE:
More information about the svn-src-stable-9
mailing list