Skip to contentSkip to conversation

New: nfs4 NULL pointer dereference in _nfs4_do_setlk

Bug 13330 Trond Myklebust 1 participant 2 messages May 21, 2009 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

A message that is not in the archive (sent off-list or not yet received): bug-13330-104-V0hAGp6uBxO456/isadD/[email protected]/

#2 lore raw
Quoted 33 lines · On Sun, 2009-05-17 at 04:44 +0000, bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGk…

http://bugzilla.kernel.org/show_bug.cgi?id=13330

Summary: nfs4 NULL pointer dereference in _nfs4_do_setlk
Product: File System
Version: 2.5
Kernel Version: 2.6.30-rc4
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: NFS
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

Created an attachment (id=21380)
--> (http://bugzilla.kernel.org/attachment.cgi?id=21380)
NFSv4 BUG ON log

My NFS server rebooted.

The machine with the kernel in question, one of many clients, spit out the attached error in dmesg, and all NFS activity on the machine blocked forever, necessitating a reboot.

This is not true on any of the other NFS clients on the network, which vary between 2.6.18 and 2.6.27, so it may be A) 64-bit specific somehow (the rest are 32-bit), B) recently introduced, or C) recently exposed by some existing bad behavior in NFS recovery being removed.

Quoted 8 lines

Machine was "vanilla" 2.6.30-rc4 (with commits b827e496c893de0c0f142abfaeb8730a2fd6b37f and 7fdf523067666b0eaff330f362401ee50ce187c4 added), 64-bit. NFSv4 mounted with rw,nosuid,nodev,noatime,hard,intr,nolock,sloppy,rsize=8192,wsize=8192,tcp,timeo=600.

I'll try reproducing this on latest GIT shortly, but it's hard to reproduce (since it only occurs after the NFS server reboots, and not even consistently then), so I don't know when I'll be able to report back that it occurs or not.

Switching to email...

I'm having trouble reproducing this, and staring at the code itself isn't helping (as far as I can see, the locking using nfsi->rwsem should work).

Could you therefore please try the attached patch?

Cheers
Trond

A message that is not in the archive (sent off-list or not yet received): 1242939802.22947.17.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org

#4 lore raw
Quoted 44 lines · Trond Myklebust
Quoted 33 lines · On Sun, 2009-05-17 at 04:44 +0000, bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGk…

http://bugzilla.kernel.org/show_bug.cgi?id=13330

Summary: nfs4 NULL pointer dereference in _nfs4_do_setlk
Product: File System
Version: 2.5
Kernel Version: 2.6.30-rc4
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: NFS
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

Created an attachment (id=21380)
--> (http://bugzilla.kernel.org/attachment.cgi?id=21380)
NFSv4 BUG ON log

My NFS server rebooted.

The machine with the kernel in question, one of many clients, spit out the attached error in dmesg, and all NFS activity on the machine blocked forever, necessitating a reboot.

This is not true on any of the other NFS clients on the network, which vary between 2.6.18 and 2.6.27, so it may be A) 64-bit specific somehow (the rest are 32-bit), B) recently introduced, or C) recently exposed by some existing bad behavior in NFS recovery being removed.

Quoted 8 lines

Machine was "vanilla" 2.6.30-rc4 (with commits b827e496c893de0c0f142abfaeb8730a2fd6b37f and 7fdf523067666b0eaff330f362401ee50ce187c4 added), 64-bit. NFSv4 mounted with rw,nosuid,nodev,noatime,hard,intr,nolock,sloppy,rsize=8192,wsize=8192,tcp,timeo=600.

I'll try reproducing this on latest GIT shortly, but it's hard to reproduce (since it only occurs after the NFS server reboots, and not even consistently then), so I don't know when I'll be able to report back that it occurs or not.

Quoted 7 lines

Switching to email...

I'm having trouble reproducing this, and staring at the code itself isn't helping (as far as I can see, the locking using nfsi->rwsem should work).

Could you therefore please try the attached patch?

You might also want to apply the attached fix to the RENEW function. It corrects a bug that can cause NFSv4 clients to fail to recover state during the grace period...

Cheers
Trond