Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/miscfs/procfs/procfs_vnops.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/miscfs/procfs/procfs_vnops.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.154.2.3 retrieving revision 1.154.2.4 diff -u -p -r1.154.2.3 -r1.154.2.4 --- src/sys/miscfs/procfs/procfs_vnops.c 2007/06/08 14:17:34 1.154.2.3 +++ src/sys/miscfs/procfs/procfs_vnops.c 2007/06/17 21:31:44 1.154.2.4 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_vnops.c,v 1.154.2.3 2007/06/08 14:17:34 ad Exp $ */ +/* $NetBSD: procfs_vnops.c,v 1.154.2.4 2007/06/17 21:31:44 ad Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.154.2.3 2007/06/08 14:17:34 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.154.2.4 2007/06/17 21:31:44 ad Exp $"); #include #include @@ -434,10 +434,13 @@ procfs_inactive(v) VOP_UNLOCK(vp, 0); error = procfs_proc_lock(pfs->pfs_pid, &p, ESRCH); - if (error != 0 && (vp->v_flag & VXLOCK) == 0) - vgone(vp); - else - procfs_proc_unlock(p); + mutex_enter(&vp->v_interlock); + if (error != 0 && (vp->v_iflag & VI_XLOCK) == 0) { + vgonel(vp, curlwp); + return (0); + } + mutex_exit(&vp->v_interlock); + procfs_proc_unlock(p); return (0); }