NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/48910: msync(2) should return ENOMEM on unmapped pages per POSIX; test criteria in t_msync incorrect
The following reply was made to PR kern/48910; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/48910: msync(2) should return ENOMEM on unmapped pages per
POSIX; test criteria in t_msync incorrect
Date: Sun, 15 Jun 2014 16:18:41 +0200
Besides the obvious test changes, this would need a kernel change - untested,
but this should do it.
We could go over the other callers of uvm_map_clean() instead and change
the return value in there as well - what do others think?
Martin
Index: uvm_mmap.c
===================================================================
RCS file: /cvsroot/src/sys/uvm/uvm_mmap.c,v
retrieving revision 1.148
diff -u -r1.148 uvm_mmap.c
--- uvm_mmap.c 25 Jan 2014 17:30:45 -0000 1.148
+++ uvm_mmap.c 15 Jun 2014 14:16:43 -0000
@@ -658,7 +658,7 @@
uvmflags |= PGO_SYNCIO;
error = uvm_map_clean(map, addr, addr+size, uvmflags);
- return error;
+ return error == EFAULT ? ENOMEM : error;
}
/*
Home |
Main Index |
Thread Index |
Old Index