Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm The only error that can occur from munlock() on NetB...
details: https://anonhg.NetBSD.org/src/rev/1bc4698eb909
branches: trunk
changeset: 346990:1bc4698eb909
user: kre <kre%NetBSD.org@localhost>
date: Tue Aug 09 12:17:04 2016 +0000
description:
The only error that can occur from munlock() on NetBSD is ENOMEM.
Make it be that way.
diffstat:
sys/uvm/uvm_mmap.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (32 lines):
diff -r f18530a2494c -r 1bc4698eb909 sys/uvm/uvm_mmap.c
--- a/sys/uvm/uvm_mmap.c Tue Aug 09 12:02:44 2016 +0000
+++ b/sys/uvm/uvm_mmap.c Tue Aug 09 12:17:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_mmap.c,v 1.161 2016/08/07 10:07:58 maxv Exp $ */
+/* $NetBSD: uvm_mmap.c,v 1.162 2016/08/09 12:17:04 kre Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.161 2016/08/07 10:07:58 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.162 2016/08/09 12:17:04 kre Exp $");
#include "opt_compat_netbsd.h"
#include "opt_pax.h"
@@ -862,9 +862,10 @@
error = uvm_map_pageable(&p->p_vmspace->vm_map, addr, addr+size, true,
0);
- if (error == EFAULT)
- error = ENOMEM;
- return error;
+ if (error)
+ return ENOMEM;
+
+ return 0;
}
/*
Home |
Main Index |
Thread Index |
Old Index