aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sys_process.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2009-06-23 20:45:22 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2009-06-23 20:45:22 +0000
commit3364c323e6ad143e0e95e2d1c7c3c3b880515860 (patch)
treeefadbd0bda4d9f0ec36869d4d465b2cabf2dcd1b /sys/kern/sys_process.c
parent224fbf9fd641d4f4b44cc3d6a44c7eb1b272968a (diff)
downloadsrc-3364c323e6ad143e0e95e2d1c7c3c3b880515860.tar.gz
src-3364c323e6ad143e0e95e2d1c7c3c3b880515860.zip
Notes
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r--sys/kern/sys_process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 0ed7ce43d03b..0cce9056ad52 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_kern.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
+#include <vm/vm_param.h>
#ifdef COMPAT_IA32
#include <sys/procfs.h>
@@ -270,7 +271,10 @@ proc_rwmem(struct proc *p, struct uio *uio)
*/
error = vm_fault(map, pageno, reqprot, fault_flags);
if (error) {
- error = EFAULT;
+ if (error == KERN_RESOURCE_SHORTAGE)
+ error = ENOMEM;
+ else
+ error = EFAULT;
break;
}