Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Make break(2) reject high adresses that wrap to 0 af...
details: https://anonhg.NetBSD.org/src/rev/510ea13eb961
branches: trunk
changeset: 749349:510ea13eb961
user: njoly <njoly%NetBSD.org@localhost>
date: Fri Nov 27 12:25:10 2009 +0000
description:
Make break(2) reject high adresses that wrap to 0 after page rounding.
diffstat:
sys/uvm/uvm_unix.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 3c7f36ed5451 -r 510ea13eb961 sys/uvm/uvm_unix.c
--- a/sys/uvm/uvm_unix.c Fri Nov 27 11:44:36 2009 +0000
+++ b/sys/uvm/uvm_unix.c Fri Nov 27 12:25:10 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_unix.c,v 1.41 2009/03/04 21:52:38 christos Exp $ */
+/* $NetBSD: uvm_unix.c,v 1.42 2009/11/27 12:25:10 njoly Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_unix.c,v 1.41 2009/03/04 21:52:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_unix.c,v 1.42 2009/11/27 12:25:10 njoly Exp $");
#include "opt_pax.h"
@@ -86,7 +86,8 @@
mutex_enter(&p->p_auxlock);
old = (vaddr_t)vm->vm_daddr;
new = round_page((vaddr_t)SCARG(uap, nsize));
- if ((new - old) > p->p_rlimit[RLIMIT_DATA].rlim_cur && new > old) {
+ if (new == 0 ||
+ ((new - old) > p->p_rlimit[RLIMIT_DATA].rlim_cur && new > old)) {
mutex_exit(&p->p_auxlock);
return (ENOMEM);
}
Home |
Main Index |
Thread Index |
Old Index