The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Tony Luck" <tony.luck@intel.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "OGAWA Hirofumi" <hirofumi@mail.parknet.co.jp>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	corbet@lwn.net
Subject: Re: Remove BKL from FAT/VFAT/MSDOS (v1) (was Re: Fw: Regression caused by bf726e "semaphore: fix,")
Date: Thu, 29 May 2008 13:45:37 -0700	[thread overview]
Message-ID: <12c511ca0805291345u4885bd1ycc83bbaa75acfc47@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.1.10.0805161812170.3020@woody.linux-foundation.org>

I'm seeing a process hang running a kernel built from the linux-next tree
with tag next-20080529 The problem commit looks to be:
35e447fc2fa408df8af2c8735f83a90cafe651ff

"Replace BKL with superblock lock in fat/msdos/vfat"

This causes a lockup when overwriting an existing file
on a vfat filesystem.  E.g. for me (where there already
exists a vmlinux.gz file in the target directory):

# cp --force vmlinux.gz /boot/efi/efi/redhat/

Stack trace looks like this:
Call Trace:
 [<a000000100712550>] schedule+0x11f0/0x1380
                                sp=e0000001bd55fc30 bsp=e0000001bd5510b8
 [<a000000100714cb0>] __mutex_lock_slowpath+0x2d0/0x520
                                sp=e0000001bd55fc50 bsp=e0000001bd551060
 [<a000000100714f20>] mutex_lock+0x20/0x40
                                sp=e0000001bd55fc80 bsp=e0000001bd551040
 [<a0000001001367d0>] lock_super+0x30/0x60
                                sp=e0000001bd55fc80 bsp=e0000001bd551020
 [<a00000010028ca30>] fat_truncate+0xb0/0x640^M
                                sp=e0000001bd55fc80 bsp=e0000001bd550fa0
 [<a0000001000fd930>] vmtruncate+0x1f0/0x260
                                sp=e0000001bd55fce0 bsp=e0000001bd550f70
 [<a000000100164250>] inode_setattr+0x50/0x320
                                sp=e0000001bd55fcf0 bsp=e0000001bd550f38
 [<a00000010028d520>] fat_setattr+0x4c0/0x580
                                sp=e0000001bd55fcf0 bsp=e0000001bd550ed0
 [<a0000001001648e0>] notify_change+0x3c0/0x620
                                sp=e0000001bd55fd10 bsp=e0000001bd550e70
 [<a00000010012fe00>] do_truncate+0xc0/0x120
                                sp=e0000001bd55fd30 bsp=e0000001bd550e30
 [<a0000001001494c0>] may_open+0x340/0x3a0
                                sp=e0000001bd55fd80 bsp=e0000001bd550de0
 [<a000000100149c60>] do_filp_open+0x740/0x11c0
                                sp=e0000001bd55fd80 bsp=e0000001bd550d18
 [<a000000100132470>] do_sys_open+0x90/0x1c0
                                sp=e0000001bd55fe30 bsp=e0000001bd550cc8
 [<a0000001001325f0>] sys_open+0x50/0x80
                                sp=e0000001bd55fe30 bsp=e0000001bd550c70

Looking at fat_setattr() I see it calls lock_super() at the start and releases
it at the end.  In between is the call to inode_setattr() ... which calls
down through inode_setattr() and vmtruncate() to fat_truncate() ...
which calls lock_super() again. Deadlock.

-Tony

  reply	other threads:[~2008-05-29 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080510121020.f33c83f7.akpm@linux-foundation.org>
     [not found] ` <20080511073338.GA17137@elte.hu>
     [not found]   ` <20080511075522.GA18214@elte.hu>
     [not found]     ` <Pine.LNX.4.64.0805111150250.32758@titan.stealer.net>
     [not found]       ` <20080511125731.GA28174@elte.hu>
     [not found]         ` <alpine.LFD.1.10.0805110941540.3330@woody.linux-foundation.org>
     [not found]           ` <20080511111210.77858eb4.akpm@linux-foundation.org>
     [not found]             ` <alpine.LFD.1.10.0805111221070.3188@woody.linux-foundation.org>
     [not found]               ` <alpine.LFD.1.10.0805111243250.3188@woody.linux-foundation.org>
     [not found]                 ` <20080511235112.GA16101@elte.hu>
     [not found]                   ` <alpine.LFD.1.10.0805120155490.3514@apollo.tec.linutronix.de>
     [not found]                     ` <alpine.LFD.1.10.0805120723440.3188@woody.linux-foundation.org>
     [not found]                       ` <alpine.LFD.1.10.0805121659470.3514@apollo.tec.linutronix.de>
     [not found]                         ` <alpine.LFD.1.10.0805121324410.3019@woody.linux-foundation.org>
     [not found]                           ` <alpine.LFD.1.10.0805161025510.3255@apollo.tec.linutronix.de>
     [not found]                             ` <alpine.LFD.1.10.0805160906580.2941@woody.linux-foundation.org>
     [not found]                               ` <alpine.LFD.1.10.0805160950180.2941@woody.linux-foundation.org>
2008-05-16 22:36                                 ` Remove BKL from FAT/VFAT/MSDOS (v1) (was Re: Fw: Regression caused by bf726e "semaphore: fix,") Linus Torvalds
2008-05-16 22:58                                   ` Linus Torvalds
2008-05-17  0:25                                   ` OGAWA Hirofumi
2008-05-17  1:31                                     ` Linus Torvalds
2008-05-29 20:45                                       ` Tony Luck [this message]
2008-05-29 21:37                                         ` Linus Torvalds
2008-05-29 23:13                                           ` Jonathan Corbet
2008-05-29 23:17                                             ` Linus Torvalds

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=12c511ca0805291345u4885bd1ycc83bbaa75acfc47@mail.gmail.com \
    --to=tony.luck@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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