tech-kern archive

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

Re: ufs_wapbl_rename



On Sat, Jul 16, 2011 at 08:04:15AM +0000, David Holland wrote:
 > This seems to be connected to rmdir, not rename. The panic has (so
 > far) always occurred in a process doing only rmdirs and no renames.
 > 
 > I've spotted two problems in ufs_rmdir but neither of them could be
 > causing this; as far as I can tell by inspection the locking in both
 > sys_rmdir and ufs_rmdir is fine... plus those aren't shared locks.
 > 
 > Anyone have any theories or guesses?

I think I've found it:

diff -r f90fca974f84 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c   Sat Jul 16 04:29:35 2011 -0400
+++ b/sys/ufs/ufs/ufs_vnops.c   Sat Jul 16 05:36:31 2011 -0400
@@ -1627,9 +1627,9 @@ ufs_rmdir(void *v)
 #endif
  out:
        VN_KNOTE(vp, NOTE_DELETE);
+       fstrans_done(dvp->v_mount);
        vput(dvp);
        vput(vp);
-       fstrans_done(dvp->v_mount);
        return (error);
 }
 

This does not appear to be the only case of such a dangling pointer
either...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index