Back out one of the Giant removals from revision 1.272. Giant was not here to
protect the vnode, it was present to synchronize access to TTY session information between exit(2) and the TTY code. While we are here, note that Giant is required for TTY protection. Clue from: bde Discussed with: jhb MFC after: 1 week
This commit is contained in:
parent
85bfbb5f09
commit
7ca6b7823d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user