diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2009-07-09 18:54:38 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2009-07-09 18:54:38 +0000 |
| commit | 7c6d401c7516fbdc7781c09d0537a0bae3146a1c (patch) | |
| tree | ed160a63ca78b5dcb3bb9302bcca80f888c543af /sys/kern | |
| parent | 1d587edb3aaac4651db5b299b8986df5ffa4e335 (diff) | |
Notes
Diffstat (limited to 'sys/kern')
| -rw-r--r-- | sys/kern/kern_exit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 450aab602cc3..cb6e7b28fa48 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -334,10 +334,11 @@ exit1(struct thread *td, int rv) tty_unlock(tp); } - if (ttyvp != NULL && ttyvp->v_type != VBAD) { + if (ttyvp != NULL) { sx_xunlock(&proctree_lock); - VOP_LOCK(ttyvp, LK_EXCLUSIVE); - VOP_REVOKE(ttyvp, REVOKEALL); + vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY); + if (ttyvp->v_type != VBAD) + VOP_REVOKE(ttyvp, REVOKEALL); VOP_UNLOCK(ttyvp, 0); sx_xlock(&proctree_lock); } |
