diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-22 11:05:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-22 11:05:20 +0000 |
commit | 1ee4a93962d4837e81a8dea248c986b96eb3f662 (patch) | |
tree | 80a7b9b4d8c005ee9bc9356625111cc4d2a17c8e /sys/kern | |
parent | 489adbd4e29e7d861ab949c9900f3bcd91923060 (diff) |
release text vnode before releasing credentials. vnode releasing can
block, but credentials should be alive until the process is really
dead. from tegge@idt.unit.no; netbsd pr#1767
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 4212de82b68..466dd88ddc5 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -338,6 +338,12 @@ loop: (void)chgproccnt(p->p_cred->p_ruid, -1); /* + * Release reference to text vnode + */ + if (p->p_textvp) + vrele(p->p_textvp); + + /* * Free up credentials. */ if (--p->p_cred->p_refcnt == 0) { @@ -346,12 +352,6 @@ loop: } /* - * Release reference to text vnode - */ - if (p->p_textvp) - vrele(p->p_textvp); - - /* * Finally finished with old proc entry. * Unlink it from its process group and free it. */ |