Messages in this thread Patch in this message | | | Date | Thu, 10 Feb 2000 14:28:17 -0500 | From | Anne Milicia <> | Subject | [PATCH] nfsd oops on alpha servers |
| |
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> The following change for 2.3.42 fixes an oops on alpha machines when nfsd <br>encounters an ESTALE file handle. The problem is that find_fh_dentry() has <br>declared "err" as unsigned. The macro ERR_PTR(err) fails to sign extend <br>the -ESTALE being returned to fh_verify(), so the IS_ERR() macro fails to <br>recognize the -ESTALE and fh_verify() uses it as a dentry pointer. <p>The result of the problem is a file handle that looks like:<font size=-1></font> <p><tt><font size=-1>crash> nfsd_attrstat fffffc0013734820</font></tt> <br><tt><font size=-1>struct nfsd_attrstat {</font></tt> <br><tt><font size=-1> fh = {</font></tt> <br><tt><font size=-1> fh_handle = {</font></tt> <br><tt><font size=-1> fh_base = {</font></tt> <br><tt><font size=-1> fb_dentry = 0xfeebbaca,</font></tt> <br><tt><font size=-1> fb_ino = 1761574,</font></tt> <br><tt><font size=-1> fb_dirino = 1761569,</font></tt> <br><tt><font size=-1> fb_dev = 2097,</font></tt> <br><tt><font size=-1> fb_xdev = 2097,</font></tt> <br><tt><font size=-1> fb_xino = 2,</font></tt> <br><tt><font size=-1> fb_generation = 1789922</font></tt> <br><tt><font size=-1> },</font></tt> <br><tt><font size=-1> fh_cookie = 0xfffffc0013734840</font></tt> <br><tt><font size=-1> },</font></tt> <br><tt><font size=-1> fh_dentry = 0xffffffba, <--- -ESTALE</font></tt> <br><tt><font size=-1> fh_export = 0xfffffc001445e800,</font></tt> <br><tt><font size=-1> fh_locked = 0</font></tt> <br><tt><font size=-1> fh_dverified = 1</font></tt> <br><tt><font size=-1> }</font></tt> <br><tt><font size=-1>}</font></tt><tt><font size=-1></font></tt> <p>And an example traceback:<tt></tt> <p><tt><font size=-1>crash> bt</font></tt> <br><tt><font size=-1>PID: 1131 TASK: fffffc0011e34000 CPU: 0 COMMAND: "nfsd"</font></tt> <br><tt><font size=-1> #0 [fffffc0011e37988] crash_save_current_state at fffffc0000333a9c</font></tt> <br><tt><font size=-1> #1 [fffffc0011e37998] panic at fffffc0000324718</font></tt> <br><tt><font size=-1> #2 [fffffc0011e37a38] die_if_kernel at fffffc00003113d0</font></tt> <br><tt><font size=-1> #3 [fffffc0011e37a68] do_page_fault at fffffc000031d550</font></tt> <br><tt><font size=-1> #4 [fffffc0011e37aa8] entMM at fffffc000031055c</font></tt> <br><tt><font size=-1> EFRAME: fffffc0011e37ae0 R24: fffffc000051b818</font></tt> <br><tt><font size=-1> R0: 00000000ffffffba R25: 0000000000000055</font></tt> <br><tt><font size=-1> R1: 0000000000000001 R26: fffffc0000397d48 <fh_verify+0x228></font></tt> <br><tt><font size=-1> R2: 0000000000000001 R27: fffffc000031bfa0</font></tt> <br><tt><font size=-1> R3: fffffc0000550828 R28: 0000000000000000</font></tt> <br><tt><font size=-1> R4: fffffc0013385fa0 HAE: 0000000000000000</font></tt> <br><tt><font size=-1> R5: fffffc00004c9e60 TRAP_A0: 00000000ffffffc2</font></tt> <br><tt><font size=-1> R6: fffffc0000621540 TRAP_A1: 0000000000000001</font></tt> <br><tt><font size=-1> R7: fffffc000051b818 TRAP_A2: 0000000000000000</font></tt> <br><tt><font size=-1> R8: fffffc0011e34000 PS: 0000000000000000</font></tt> <br><tt><font size=-1> R19: fffffc000061db30 PC: fffffc0000397dc8 <fh_verify+0x2a8></font></tt> <br><tt><font size=-1> R20: fffffc0013384bc0 GP: fffffc0000549488</font></tt> <br><tt><font size=-1> R21: fffffc0005cb6400 R16: 0000000000000000</font></tt> <br><tt><font size=-1> R22: fffffc00004c9e60 R17: fffffc00004e629c</font></tt> <br><tt><font size=-1> R23: 000000000000014e R18: 0000000000000607</font></tt> <br><tt><font size=-1> #5 [fffffc0011e37bc8] fh_verify at fffffc0000397dc8</font></tt> <br><tt><font size=-1> #6 [fffffc0011e37c18] nfsd_open at fffffc0000398dac</font></tt> <br><tt><font size=-1> #7 [fffffc0011e37c48] nfsd_write at fffffc000039949c</font></tt> <br><tt><font size=-1> #8 [fffffc0011e37d68] nfsd_proc_write at fffffc0000395fcc</font></tt> <br><tt><font size=-1> #9 [fffffc0011e37d88] nfsd_dispatch at fffffc00003952a8</font></tt> <br><tt><font size=-1>#10 [fffffc0011e37db8] svc_process at fffffc000040bbac</font></tt> <br><tt><font size=-1>#11 [fffffc0011e37e08] nfsd at fffffc0000394fbc</font></tt> <br><tt><font size=-1>#12 [fffffc0011e37e48] kernel_thread at fffffc00003107f0</font></tt><tt><font size=-1></font></tt> <p>Thanks, <br>Anne Milicia milicia@missioncriticallinux.com <br><A HREF="http://www.missioncriticallinux.com">http://www.missioncriticallinux.com</A><tt></tt> <p><tt><font size=-1>diff -u linux-2.3.42/fs/nfsd/nfsfh.c.orig linux-2.3.42/fs/nfsd/nfsfh.c</font></tt> <br><tt><font size=-1>--- linux-2.3.42/fs/nfsd/nfsfh.c.orig Thu Feb 10 10:06:53 2000</font></tt> <br><tt><font size=-1>+++ linux-2.3.42/fs/nfsd/nfsfh.c Thu Feb 10 10:07:23 2000</font></tt> <br><tt><font size=-1>@@ -301,7 +301,7 @@</font></tt> <br><tt><font size=-1> struct dentry *dentry, *result = NULL;</font></tt> <br><tt><font size=-1> struct dentry *tmp;</font></tt> <br><tt><font size=-1> int found =0;</font></tt> <br><tt><font size=-1>- u32 err;</font></tt> <br><tt><font size=-1>+ int err;</font></tt> <br><tt><font size=-1> /* This semaphore is needed to make sure that only one unconnected (free)</font></tt> <br><tt><font size=-1> * dcache path ever exists, as otherwise two partial paths might get</font></tt> <br><tt><font size=-1> * joined together, which would be very confusing.</font></tt></html>
| |