NetBSD-Bugs archive

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

Re: kern/44288: tmpfs_rmdir() panic



The following reply was made to PR kern/44288; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/44288: tmpfs_rmdir() panic
Date: Sun, 2 Jan 2011 00:39:18 +0000

 On Wed, Dec 29, 2010 at 03:50:03PM +0000, Jukka Ruohonen wrote:
  >  2. The assertion is:
  >  
  >     "node->tn_links == 0" failed: file
  >     "/usr/src/sys/fs/tmpfs/tmpfs_vnops.c", line 1108.
 
 Can you slap this in and see if it goes off instead? Probably the
 problem is that the direectory is corrupt; asserting earlier rules out
 a gaffe somewhere in the rmdir logic itself.
 
 
 Index: tmpfs_vnops.c
 ===================================================================
 RCS file: /cvsroot/src/sys/fs/tmpfs/tmpfs_vnops.c,v
 retrieving revision 1.75
 diff -p -U 5 -r1.75 tmpfs_vnops.c
 --- tmpfs_vnops.c      30 Nov 2010 10:43:04 -0000      1.75
 +++ tmpfs_vnops.c      2 Jan 2011 00:35:25 -0000
 @@ -1069,10 +1069,11 @@ tmpfs_rmdir(void *v)
         * removed. */
        if (node->tn_size > 0) {
                error = ENOTEMPTY;
                goto out;
        }
 +      KASSERT(node->tn_links == 2);
  
        /* This invariant holds only if we are not trying to remove "..".
         * We checked for that above so this is safe now. */
        KASSERT(node->tn_spec.tn_dir.tn_parent == dnode);
  
 
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index