summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index a13c6f3..5b937b4 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -301,13 +301,13 @@ retry:
vmspace_exit(td);
+ mtx_lock(&Giant); /* XXX TTY */
sx_xlock(&proctree_lock);
if (SESS_LEADER(p)) {
struct session *sp;
sp = p->p_session;
if (sp->s_ttyvp) {
- locked = VFS_LOCK_GIANT(sp->s_ttyvp->v_mount);
/*
* Controlling process.
* Signal foreground pgrp,
@@ -353,7 +353,6 @@ retry:
* that the session once had a controlling terminal.
* (for logging and informational purposes)
*/
- VFS_UNLOCK_GIANT(locked);
}
SESS_LOCK(p->p_session);
sp->s_leader = NULL;
@@ -362,6 +361,7 @@ retry:
fixjobc(p, p->p_pgrp, 0);
sx_xunlock(&proctree_lock);
(void)acct_process(td);
+ mtx_unlock(&Giant);
#ifdef KTRACE
/*
* Drain any pending records on the thread and release the trace
OpenPOWER on IntegriCloud