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

RE: [NFS] kernel nfsd crash



Replying to myself one last time...

Ran through the stack trace, and sure enough, dput() kills us when it's called twice in a row with the same dentry.  Here's the appropriate fix.  

Of course the open question is still how this directory wound up without a .., but at least NFS continues.

    --- nfsfh.c 2001/05/09 00:54:56 1.1 
    +++ nfsfh.c 2001/05/09 00:56:01 
    @@ -244,6 +244,10 @@ 
              */ 
             pdentry = child->d_inode->i_op->lookup(child->d_inode, tdentry); 
             d_drop(tdentry); /* we never want ".." hashed */ 
    + if (!pdentry && tdentry->d_inode == NULL) { 
    + dput(tdentry); 
    + pdentry = ERR_PTR(-EINVAL); 
==> + return()
    + } 
             if (!pdentry) { 
                     /* I don't want to return a ".." dentry. 
                      * I would prefer to return an unconnected "IS_ROOT" dentry,

-----Original Message-----
From: Christian, Chip [mailto:chip.christian@storageapps.com]
Sent: Tuesday, August 07, 2001 22:58
To: 'NFS list (E-mail)'
Subject: RE: [NFS] kernel nfsd crash


Sorry to keep responding to myself...

The code as it is right now will do this:
	dput(tdentry); 
	pdentry = ERR_PTR(-EINVAL); 
	if (!pdentry) {}
	dput(tdentry);
	return(pdentry);
Is it somehow screwing us up to call dput() twice like that?

-----Original Message-----
From: Christian, Chip 
Sent: Tuesday, August 07, 2001 22:43
To: Christian, Chip; NFS list (E-mail)
Subject: RE: [NFS] kernel nfsd crash


I don't get an oops, but knfsd surely does stop.  It's happened to two different servers now, as well.

And, by the way, this patch has already been applied 2.4.3 by RedHat:
http://uwsg.iu.edu/hypermail/linux/kernel/0105.1/0135.html


--- nfsfh.c 2001/05/09 00:54:56 1.1 
+++ nfsfh.c 2001/05/09 00:56:01 
@@ -244,6 +244,10 @@ 
          */ 
         pdentry = child->d_inode->i_op->lookup(child->d_inode, tdentry); 
         d_drop(tdentry); /* we never want ".." hashed */ 
+ if (!pdentry && tdentry->d_inode == NULL) { 
+ dput(tdentry); 
+ pdentry = ERR_PTR(-EINVAL); 
+ } 
         if (!pdentry) { 
                 /* I don't want to return a ".." dentry. 
                  * I would prefer to return an unconnected "IS_ROOT" dentry, 


-----Original Message-----
From: Christian, Chip [mailto:chip.christian@storageapps.com]
Sent: Tuesday, August 07, 2001 16:04
To: NFS list (E-mail)
Subject: [NFS] kernel nfsd crash


All,

I had the following occur at a client site.  
This is on  2.4.3-SGI_XFS_1.0.1 #1 SMP, i686, RedHat Linux 7.1.
Any clues as to possible causes?  Any more info I should collect?
Thanks.

	-Chip

Aug  6 11:15:50 nas1 kernel: invalid operand: 0000
Aug  6 11:15:50 nas1 kernel: CPU:    0
Aug  6 11:15:50 nas1 kernel: EIP:    0010:[dput+23/368]
Aug  6 11:15:50 nas1 kernel: EIP:    0010:[<80145017>]
Aug  6 11:15:50 nas1 kernel: EFLAGS: 00010246
Aug  6 11:15:50 nas1 kernel: eax: 00000000   ebx: 8908a8a0   ecx: 8908a920   edx: 8908a8a0
Aug  6 11:15:50 nas1 kernel: esi: 8908a8a0   edi: 8908a920   ebp: 8908a920   esp: 8e0bbebc
Aug  6 11:15:50 nas1 kernel: ds: 0018   es: 0018   ss: 0018
Aug  6 11:15:50 nas1 kernel: Process nfsd (pid: 24239, stackpage=8e0bb000)
Aug  6 11:15:50 nas1 kernel: Stack: 00000007 8908a920 8908a8a0 8908a920 ffffffea 8908a8a0 80177ed8 8908a8a0
Aug  6 11:15:50 nas1 kernel:        00400080 00000000 80178276 8908a920 87dcb078 ffffff8c 00000000 00400080
Aug  6 11:15:50 nas1 kernel:        00000000 8efef004 8cade800 80178633 8e3a4400 00400080 00000000 00000000
Aug  6 11:15:50 nas1 kernel: Call Trace: [nfsd_findparent+248/256] [find_fh_dentry+566/896] [fh_verify+627/1200] [nfsd3_proc_getattr+151/176] [nfsd_dispatch+193/352]
Aug  6 11:15:50 nas1 kernel: Call Trace: [<80177ed8>] [<80178276>] [<80178633>][<8017e627>] [<801764a1>]
Aug  6 11:15:50 nas1 kernel:    [svc_process+851/1248] [nfsd+505/800] [kernel_thread+38/48] [nfsd+0/800]
Aug  6 11:15:50 nas1 kernel:    [<80297ff3>] [<801762b9>] [<801055a6>] [<801760c0>]
Aug  6 11:15:50 nas1 kernel:
Aug  6 11:15:50 nas1 kernel: Code: 0f 0b 68 d8 14 30 80 53 e8 9c 64 15 00 5e 85c0 5a 0f 84 34


_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/nfs

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/nfs