From 7b0b6888cc714d33846c6edef824e42bd0365b7d Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 13 Mar 2005 11:47:04 +0000 Subject: [PATCH] - 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. --- sys/kern/kern_exit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } }