mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, torvalds@osdl.org
Subject: Re: BUG fs/dcache.c:595 in 2.4.24rc3-git3 during NFS umount
Date: Sun, 09 Dec 2007 18:45:01 -0500	[thread overview]
Message-ID: <1197243901.11792.1.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <200712081422.30815.ak@suse.de>

[-- Attachment #1: Type: text/plain, Size: 3486 bytes --]


On Sat, 2007-12-08 at 14:22 +0100, Andi Kleen wrote:
>  [39943.212533] ------------[ cut here ]------------
> [39943.221973] kernel BUG at fs/dcache.c:595!
> [39943.230369] invalid opcode: 0000 [1] SMP
> [39943.238638] last sysfs file: /devices/system/cpu/cpu7/cache/index2/shared_cpu_map
> [39943.253998] CPU 3
> [39943.258283] Modules linked in: nfs lockd nfs_acl sunrpc autofs4 iptable_filter ip_tables ip6table_filter ip6_tables x_tables af_packet ipv6 cpufreq_conservative cpufreq_userspace cpufreq_powersave acpi_cpufreq dm_crypt ext2 ext3 jbd mbcache loop dm_mod e1000 i2c_i801 shpchp container pci_hotplug button iTCO_wdt rtc_cmos rtc_core i2c_core iTCO_vendor_support rtc_lib sr_mod cdrom floppy sg ehci_hcd uhci_hcd sd_mod usbcore edd reiserfs fan aic79xx scsi_transport_spi ata_piix ahci libata scsi_mod thermal processor
> [39943.351718] Pid: 31869, comm: umount.nfs Tainted: G       N 2.6.24-rc4-git3-20071206230004-default #1
> [39943.370555] RIP: 0010:[<ffffffff802a64ce>]  [<ffffffff802a64ce>] shrink_dcache_for_umount_subtree+0x16/0x241
> [39943.390671] RSP: 0018:ffff8101dc88fe18  EFLAGS: 00010206
> [39943.401552] RAX: 0000000000000000 RBX: ffff8100840893c0 RCX: 0000000000000000
> [39943.416040] RDX: 00000000ffffffff RSI: 0000000000000296 RDI: ffff8100840893c0
> [39943.430504] RBP: ffff8100084fff20 R08: ffff81004d0a6850 R09: 0000000000000296
> [39943.444969] R10: ffff81004d0a6850 R11: ffffffff802f778c R12: ffff810222439400
> [39943.459424] R13: 0000000000000000 R14: 00007fef065cdf00 R15: 0000000000000000
> [39943.473887] FS:  00007fef052ad6f0(0000) GS:ffff810226419940(0000) knlGS:0000000000000000
> [39943.490452] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> [39943.502134] CR2: 00007f5793a36580 CR3: 000000021ee38000 CR4: 00000000000006e0
> [39943.516599] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [39943.531049] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> [39943.545507] Process umount.nfs (pid: 31869, threadinfo ffff8101dc88e000, task ffff81021ef3b080)
> [39943.563289] Stack:  0000000000000296 ffff810222439400 ffffffff883e9be0 ffff810222439400
> [39943.579846]  0000000000000000 ffffffff802a6728 ffff810222439400 ffffffff80297e34
> [39943.595152]  ffff81004d0a67c0 0000000000000017 ffffffff88401a80 ffffffff80297f33
> [39943.609871] Call Trace:
> [39943.615566]  [<ffffffff802a6728>] shrink_dcache_for_umount+0x2f/0x3d
> [39943.628463]  [<ffffffff80297e34>] generic_shutdown_super+0x19/0xf1
> [39943.641011]  [<ffffffff80297f33>] kill_anon_super+0x9/0x35
> [39943.652193]  [<ffffffff883cd1ba>] :nfs:nfs_kill_super+0xd/0x16
> [39943.664037]  [<ffffffff80297fe4>] deactivate_super+0x6a/0x83
> [39943.675537]  [<ffffffff802ab8ab>] sys_umount+0x23c/0x24d
> [39943.686361]  [<ffffffff802a5c8a>] d_kill+0x40/0x55
> [39943.696139]  [<ffffffff802a7217>] dput+0x26/0x115
> [39943.705745]  [<ffffffff802970c0>] __fput+0x14a/0x179
> [39943.715861]  [<ffffffff802aabd1>] mntput_no_expire+0x1f/0x86
> [39943.727375]  [<ffffffff802946ea>] filp_close+0x5a/0x61
> [39943.737853]  [<ffffffff8020bfde>] system_call+0x7e/0x83
> [39943.748495]
> [39943.751674]
> [39943.751675] Code: 0f 0b eb fe 48 c7 c7 80 06 63 80 e8 67 75 17 00 48 8b 53 40
> [39943.770405] RIP  [<ffffffff802a64ce>] shrink_dcache_for_umount_subtree+0x16/0x241
> [39943.785790]  RSP <ffff8101dc88fe18>
> [82148.423473] JBD: barrier-based sync failed on dm-1 - disabling barriers

Hi Andi,

Does the attached patch fix the Oops?

Cheers
  Trond

[-- Attachment #2: Type: message/rfc822, Size: 1298 bytes --]

From: Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: NFS: Fix an Oops in NFS unmount
Date: 
Message-ID: <1197243901.11792.2.camel@heimdal.trondhjem.org>

Ensure that the dummy 'root dentry' is invisible to d_find_alias(). If not,
then it may be spliced into the tree if a parent directory from the same
filesystem gets mounted at a later time.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---

 fs/nfs/getroot.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 0ee4384..076987e 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -57,6 +57,15 @@ static int nfs_superblock_set_dummy_root(struct super_block *sb, struct inode *i
 		}
 		/* Circumvent igrab(): we know the inode is not being freed */
 		atomic_inc(&inode->i_count);
+		/*
+		 * Ensure that this dentry is invisible to d_find_alias().
+		 * Otherwise, it may be spliced into the tree by
+		 * d_materialise_unique if a parent directory from the same
+		 * filesystem gets mounted at a later time.
+		 * This again causes shrink_dcache_for_umount_subtree() to
+		 * Oops, since the test for IS_ROOT() will fail.
+		 */
+		sb->s_root->d_flags |= DCACHE_DISCONNECTED;
 	}
 	return 0;
 }

  reply	other threads:[~2007-12-09 23:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 15:23 Andi Kleen
2007-12-06 23:25 ` Andrew Morton
2007-12-08 13:22 ` Andi Kleen
2007-12-09 23:45   ` Trond Myklebust [this message]
2007-12-10 18:57     ` Andi Kleen
2007-12-12  2:54       ` Trond Myklebust
2007-12-12 23:42         ` Andi Kleen
2007-12-13  1:02           ` Trond Myklebust

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=1197243901.11792.1.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®