summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-03-30 21:54:48 +0000
committerguenther <guenther@openbsd.org>2014-03-30 21:54:48 +0000
commitd559b8cb6cdd6f912edd28712213aec79fb0b7bc (patch)
treeffe701d81fb3c6b370ebfd396ab32a273424b5b5 /sys/kern/kern_exit.c
parentSupport relative arguments to .ll (increase or decrease line length). (diff)
downloadwireguard-openbsd-d559b8cb6cdd6f912edd28712213aec79fb0b7bc.tar.xz
wireguard-openbsd-d559b8cb6cdd6f912edd28712213aec79fb0b7bc.zip
Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 1dbac28a8b5..d559c72fae0 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.137 2014/03/26 05:23:42 guenther Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.138 2014/03/30 21:54:48 guenther Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -638,7 +638,7 @@ process_zap(struct process *pr)
/*
* Decrement the count of procs running with this uid.
*/
- (void)chgproccnt(pr->ps_cred->p_ruid, -1);
+ (void)chgproccnt(pr->ps_ucred->cr_ruid, -1);
/*
* Release reference to text vnode
@@ -654,8 +654,7 @@ process_zap(struct process *pr)
pool_put(&rusage_pool, pr->ps_ru);
KASSERT(TAILQ_EMPTY(&pr->ps_threads));
limfree(pr->ps_limit);
- crfree(pr->ps_cred->pc_ucred);
- pool_put(&pcred_pool, pr->ps_cred);
+ crfree(pr->ps_ucred);
pool_put(&process_pool, pr);
nprocesses--;