From owner-svn-src-all@FreeBSD.ORG Tue Oct 13 09:24:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5430106568D; Tue, 13 Oct 2009 09:24:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D14958FC1C; Tue, 13 Oct 2009 09:24:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9D9Oplb000443; Tue, 13 Oct 2009 09:24:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9D9OpBp000441; Tue, 13 Oct 2009 09:24:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910130924.n9D9OpBp000441@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Oct 2009 09:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198025 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2009 09:24:52 -0000 Author: kib Date: Tue Oct 13 09:24:51 2009 New Revision: 198025 URL: http://svn.freebsd.org/changeset/base/198025 Log: MFC r197942: 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. Approved by: re (bz) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_exit.c Modified: stable/8/sys/kern/kern_exit.c ============================================================================== --- stable/8/sys/kern/kern_exit.c Tue Oct 13 09:21:20 2009 (r198024) +++ stable/8/sys/kern/kern_exit.c Tue Oct 13 09:24:51 2009 (r198025) @@ -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); } }