diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-05-05 08:38:24 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-05-05 08:38:24 +0000 |
commit | fdae72b57f1f920d9f30f04d2c15dfe67f7193ac (patch) | |
tree | 1b5d05d016cfa7a7326a2a57f3932186d78693ed /sys/kern/kern_exit.c | |
parent | abeda13edb6abcd10643259f241b8837e1a58f1e (diff) |
Don't set filesize limit to infinity on exit.
This is only needed in accounting and has to be done carefully because
the limit structures are shared between processes.
Found by Denis A. Doroshenko, analysed by Hannah Schroeter.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 97a98643f58..a854b511733 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.23 2000/04/20 10:03:43 art Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.24 2000/05/05 08:38:23 art Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -203,7 +203,6 @@ exit1(p, rv) sp->s_leader = NULL; } fixjobc(p, p->p_pgrp, 0); - p->p_rlimit[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; (void)acct_process(p); #ifdef KTRACE /* @@ -292,8 +291,8 @@ exit1(p, rv) * Other substructures are freed from wait(). */ curproc = NULL; - if (--p->p_limit->p_refcnt == 0) - FREE(p->p_limit, M_SUBPROC); + limfree(p->p_limit); + p->p_limit = NULL; /* * Finally, call machine-dependent code to release the remaining |