Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs/procfs PR/29782: Martin Husemann: procfs can not ...



details:   https://anonhg.NetBSD.org/src/rev/aef90e7af217
branches:  trunk
changeset: 579952:aef90e7af217
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 02 06:15:09 2005 +0000

description:
PR/29782: Martin Husemann: procfs can not unmount when some process has its
current directory in curproc. Fix from Pedro Martelletto:
We cannot call vgone() from procfs_inactive() if we are coming from
vclean(). that's what's probably causing the deadlock.

diffstat:

 sys/miscfs/procfs/procfs_vnops.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r 2343bff57872 -r aef90e7af217 sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c  Sat Apr 02 06:09:45 2005 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c  Sat Apr 02 06:15:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_vnops.c,v 1.121 2005/02/26 22:59:00 perry Exp $ */
+/*     $NetBSD: procfs_vnops.c,v 1.122 2005/04/02 06:15:09 christos Exp $      */
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.121 2005/02/26 22:59:00 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.122 2005/04/02 06:15:09 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -366,11 +366,12 @@
                struct vnode *a_vp;
                struct proc *a_p;
        } */ *ap = v;
-       struct pfsnode *pfs = VTOPFS(ap->a_vp);
+       struct vnode *vp = ap->a_vp;
+       struct pfsnode *pfs = VTOPFS(vp);
 
-       VOP_UNLOCK(ap->a_vp, 0);
-       if (PFIND(pfs->pfs_pid) == NULL)
-               vgone(ap->a_vp);
+       VOP_UNLOCK(vp, 0);
+       if (PFIND(pfs->pfs_pid) == NULL && (vp->v_flag & VXLOCK) == 0)
+               vgone(vp);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index