aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2005-03-13 11:47:04 +0000
committerJeff Roberson <jeff@FreeBSD.org>2005-03-13 11:47:04 +0000
commit2b3183a8b7b7dec222ae16b8caadce29365ce162 (patch)
tree53752a6ef6ca456b0a95109463e7335b53f64781
parent9331fd135bf9ca019298b3b4526212df2263eff7 (diff)
downloadsrc-2b3183a8b7b7dec222ae16b8caadce29365ce162.tar.gz
src-2b3183a8b7b7dec222ae16b8caadce29365ce162.zip
- A lock is required before calling VOP_REVOKE. Our reference protects us
from accessing another vnode so a naked VOP_LOCK is sufficient. Sponsored by: Isilon Systems, Inc.
Notes
Notes: svn path=/head/; revision=143496
-rw-r--r--sys/kern/kern_exit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index a52e69521eca..e27e9b0cf750 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -320,8 +320,9 @@ retry:
sp->s_ttyvp = NULL;
SESS_UNLOCK(p->p_session);
sx_xunlock(&proctree_lock);
+ VOP_LOCK(ttyvp, LK_EXCLUSIVE, td);
VOP_REVOKE(ttyvp, REVOKEALL);
- vrele(ttyvp);
+ vput(ttyvp);
sx_xlock(&proctree_lock);
}
}