Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern limits are bytes, vm sizes are clicks.



details:   https://anonhg.NetBSD.org/src/rev/0801f9f07146
branches:  trunk
changeset: 321864:0801f9f07146
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Apr 08 11:43:01 2018 +0000

description:
limits are bytes, vm sizes are clicks.

diffstat:

 sys/kern/kern_resource.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r ebf4b33c9ac6 -r 0801f9f07146 sys/kern/kern_resource.c
--- a/sys/kern/kern_resource.c  Sun Apr 08 11:37:31 2018 +0000
+++ b/sys/kern/kern_resource.c  Sun Apr 08 11:43:01 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_resource.c,v 1.176 2017/03/24 21:43:20 pgoyette Exp $     */
+/*     $NetBSD: kern_resource.c,v 1.177 2018/04/08 11:43:01 mlelstv Exp $      */
 
 /*-
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.176 2017/03/24 21:43:20 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.177 2018/04/08 11:43:01 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -388,8 +388,8 @@
                 * moment it would try to access anything on its current stack.
                 * This conforms to SUSv2.
                 */
-               if (limp->rlim_cur < p->p_vmspace->vm_ssize * PAGE_SIZE ||
-                   limp->rlim_max < p->p_vmspace->vm_ssize * PAGE_SIZE) {
+               if (btoc(limp->rlim_cur) < p->p_vmspace->vm_ssize ||
+                   btoc(limp->rlim_max) < p->p_vmspace->vm_ssize) {
                        return EINVAL;
                }
 



Home | Main Index | Thread Index | Old Index