Refine r195509, instead of checking that vnode type is VBAD, that is
set quite late in the revocation path, properly verify that vnode is not doomed before calling VOP. Reported and tested by: Harald Schmalzbauer <h.schmalzbauer omnilan de> MFC after: 3 days
This commit is contained in:
parent
ab02d85f0d
commit
6728dc169d
@ -340,10 +340,10 @@ exit1(struct thread *td, int rv)
|
||||
|
||||
if (ttyvp != NULL) {
|
||||
sx_xunlock(&proctree_lock);
|
||||
vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY);
|
||||
if (ttyvp->v_type != VBAD)
|
||||
if (vn_lock(ttyvp, LK_EXCLUSIVE) == 0) {
|
||||
VOP_REVOKE(ttyvp, REVOKEALL);
|
||||
VOP_UNLOCK(ttyvp, 0);
|
||||
VOP_UNLOCK(ttyvp, 0);
|
||||
}
|
||||
sx_xlock(&proctree_lock);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user