diff options
author | jeff <jeff@FreeBSD.org> | 2005-03-13 11:47:04 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-03-13 11:47:04 +0000 |
commit | 7b0b6888cc714d33846c6edef824e42bd0365b7d (patch) | |
tree | 53752a6ef6ca456b0a95109463e7335b53f64781 /sys/kern/kern_exit.c | |
parent | 938e1f1a5c43c357cee154cd9b9fd239db50e31b (diff) | |
download | FreeBSD-src-7b0b6888cc714d33846c6edef824e42bd0365b7d.zip FreeBSD-src-7b0b6888cc714d33846c6edef824e42bd0365b7d.tar.gz |
- 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.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index a52e695..e27e9b0 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); } } |