Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern In dosetrlimit() round stack hard limit just like s...
details: https://anonhg.NetBSD.org/src/rev/49087c006f6d
branches: trunk
changeset: 346441:49087c006f6d
user: njoly <njoly%NetBSD.org@localhost>
date: Wed Jul 13 09:52:00 2016 +0000
description:
In dosetrlimit() round stack hard limit just like soft one.
Avoid cases where hard limit becomes smaller than soft limit.
diffstat:
sys/kern/kern_resource.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 17339e1a8944 -r 49087c006f6d sys/kern/kern_resource.c
--- a/sys/kern/kern_resource.c Wed Jul 13 09:05:16 2016 +0000
+++ b/sys/kern/kern_resource.c Wed Jul 13 09:52:00 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_resource.c,v 1.174 2014/10/18 08:33:29 snj Exp $ */
+/* $NetBSD: kern_resource.c,v 1.175 2016/07/13 09:52:00 njoly Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.174 2014/10/18 08:33:29 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.175 2016/07/13 09:52:00 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -404,6 +404,7 @@
* overlap). If stack limit is going up make more
* accessible, if going down make inaccessible.
*/
+ limp->rlim_max = round_page(limp->rlim_max);
limp->rlim_cur = round_page(limp->rlim_cur);
if (limp->rlim_cur != alimp->rlim_cur) {
vaddr_t addr;
Home |
Main Index |
Thread Index |
Old Index