public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: linux-kernel@vger.kernel.org, delgado@dfn-cert.de
Cc: delgado@dfn-cert.de, linux-kernel@vger.kernel.org
Subject: Re: Problem: Kernel Panic/Oops on shutdown with 2.6.9 and Dell Optiplex SX280
Date: Tue, 30 Nov 2004 19:44:56 -0800	[thread overview]
Message-ID: <20041130194456.57c5f737.akpm@osdl.org> (raw)
In-Reply-To: <20041130160717.GA13106@kermit.dfn-cert.de>

Friedrich Delgado Friedrichs <delgado@dfn-cert.de> wrote:
>
> CPU:    1
>  EIP:    0060:[<c0171af7>]    Tainted: GF VLI
>  EFLAGS: 00010246   (2.6.9-1-smp 20041109140641)
>  EIP is at __d_path+087/1x170
>  eax: 00000000   ebx: dd9aefff   ecx: deb4d290   edx: dd9aeffe
>  esi: d86ce320   edi: 00000f07   ebp: 00000f07   esp: d744decc
>  ds: 007b   es: 007b   ss: 0068
>  Process fuser (pid: 16550, threadinfo=d744c000 task=deced350)
>  Stack: dd9aeffe deb4d290 00000000 df518100 deb4d290 dd9ae0f8 00000000 c0171c63
>         df518100 dd9ae0f8 00000f07 d86ce320 dd9ae0f8 d86ce320 c0aa8180 c035ab84
>         c017752e 00000f08 df096f00 00000005 0000002c c0aa8180 df096f00 c0186703
>  Call Trace:
>   [<c0171c63>] d_path+0x83/0xe0
>   [<c017752e>] seq_path+0x2e/0xf0
>   [<c0186703>] show_map+0xd3/0x100
>   [<c01770c2>] seq_read+0x232/0x290
>   [<c0176e90>] seq_read+0x0/0x290
>   [<c015aaae>] vfs_read+0xae/0xf0
>   [<c015ad0c>] sys_read+0xec/0x70
>   [<c0106dc9>] sysenter_past_esp+0x52/0x79
>  Code: 00 00 8d 43 ff 89 04 24 c6 43 ff 2f 8b 44 24 20 3b 74 24 04 0f 94 c2 39 44
>   24 08 0f 94 c0 21 d0 8b 14 24 a8 01 75 63 8b 44 24 08 <3b> 70 10 74 64 8b 6e 10
>   39 ee 74 5d 0f 18 45 00 8b 56 1c 8b 44
>   Nov 30 14:16:50 count kernel: Unable to handle kernel NULL pointer dereference
>  at virtual address 00000010

You crashed here, in __d_path:

                   if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {

because vfsmnt is zero.  When generating /proc/pid/maps, show_map()
stumbled across a vma whose vm_file->f_vfsmnt is zero.

It's interesting that this only happens during shutdown: something may be
racing against an unmount.

I'd suggest that you run with the below patch which, if it's right, will
display the offending path and will then pause for ten seconds.  If we can
identify which filesystem type that path lives on then perhaps we can make
some progress.


--- 25/fs/dcache.c~a	2004-11-30 19:38:49.441332720 -0800
+++ 25-akpm/fs/dcache.c	2004-11-30 19:43:20.865070040 -0800
@@ -32,6 +32,7 @@
 #include <linux/seqlock.h>
 #include <linux/swap.h>
 #include <linux/bootmem.h>
+#include <linux/delay.h>
 
 /* #define DCACHE_DEBUG 1 */
 
@@ -1291,6 +1292,7 @@ static char * __d_path( struct dentry *d
 	char * end = buffer+buflen;
 	char * retval;
 	int namelen;
+	int whoops = 0;
 
 	*--end = '\0';
 	buflen--;
@@ -1313,6 +1315,12 @@ static char * __d_path( struct dentry *d
 
 		if (dentry == root && vfsmnt == rootmnt)
 			break;
+		if (vfsmnt == NULL) {
+			printk(KERN_EMERG "%s: skipping NULL vfsmnt\n",
+					__FUNCTION__);
+			whoops = 1;
+			goto global_root;
+		}
 		if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
 			/* Global root? */
 			spin_lock(&vfsmount_lock);
@@ -1347,6 +1355,11 @@ global_root:
 		goto Elong;
 	retval -= namelen-1;	/* hit the slash */
 	memcpy(retval, dentry->d_name.name, namelen);
+	if (whoops) {
+		retval[namelen] = 0;
+		printk(KERN_EMERG "path: `%s'\n", buffer);
+		mdelay(10000);
+	}
 	return retval;
 Elong:
 	return ERR_PTR(-ENAMETOOLONG);
_


  parent reply	other threads:[~2004-12-01  3:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-30 16:07 Problem: Kernel Panic/Oops on shutdown with 2.6.9 and Dell Optiplex SX280 Friedrich Delgado Friedrichs
2004-11-30 18:30 ` Alan Cox
2004-12-03 14:07   ` Friedrich Delgado Friedrichs
2004-12-01  3:44 ` Andrew Morton [this message]
2004-12-03 13:43   ` Friedrich Delgado Friedrichs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041130194456.57c5f737.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=delgado@dfn-cert.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox