diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2009-06-23 20:45:22 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2009-06-23 20:45:22 +0000 |
commit | 3364c323e6ad143e0e95e2d1c7c3c3b880515860 (patch) | |
tree | efadbd0bda4d9f0ec36869d4d465b2cabf2dcd1b /sys/kern/sys_process.c | |
parent | 224fbf9fd641d4f4b44cc3d6a44c7eb1b272968a (diff) | |
download | src-3364c323e6ad143e0e95e2d1c7c3c3b880515860.tar.gz src-3364c323e6ad143e0e95e2d1c7c3c3b880515860.zip |
Notes
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 6 |
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; } |