linux-uconsole/drivers
Lauri Hintsala 2df2bfdbb4 mmc: mxs-mmc: fix deadlock in SDIO IRQ case
commit 1af36b2a99 upstream.

Release the lock before mmc_signal_sdio_irq is called by mxs_mmc_irq_handler.

Backtrace:
[   79.660000] =============================================
[   79.660000] [ INFO: possible recursive locking detected ]
[   79.660000] 3.4.0-00009-g3e96082-dirty #11 Not tainted
[   79.660000] ---------------------------------------------
[   79.660000] swapper/0 is trying to acquire lock:
[   79.660000]  (&(&host->lock)->rlock#2){-.....}, at: [<c026ea3c>] mxs_mmc_enable_sdio_irq+0x18/0xd4
[   79.660000]
[   79.660000] but task is already holding lock:
[   79.660000]  (&(&host->lock)->rlock#2){-.....}, at: [<c026f744>] mxs_mmc_irq_handler+0x1c/0xe8
[   79.660000]
[   79.660000] other info that might help us debug this:
[   79.660000]  Possible unsafe locking scenario:
[   79.660000]
[   79.660000]        CPU0
[   79.660000]        ----
[   79.660000]   lock(&(&host->lock)->rlock#2);
[   79.660000]   lock(&(&host->lock)->rlock#2);
[   79.660000]
[   79.660000]  *** DEADLOCK ***
[   79.660000]
[   79.660000]  May be due to missing lock nesting notation
[   79.660000]
[   79.660000] 1 lock held by swapper/0:
[   79.660000]  #0:  (&(&host->lock)->rlock#2){-.....}, at: [<c026f744>] mxs_mmc_irq_handler+0x1c/0xe8
[   79.660000]
[   79.660000] stack backtrace:
[   79.660000] [<c0014bd0>] (unwind_backtrace+0x0/0xf4) from [<c005f9c0>] (__lock_acquire+0x1948/0x1d48)
[   79.660000] [<c005f9c0>] (__lock_acquire+0x1948/0x1d48) from [<c005fea0>] (lock_acquire+0xe0/0xf8)
[   79.660000] [<c005fea0>] (lock_acquire+0xe0/0xf8) from [<c03a8460>] (_raw_spin_lock_irqsave+0x44/0x58)
[   79.660000] [<c03a8460>] (_raw_spin_lock_irqsave+0x44/0x58) from [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4)
[   79.660000] [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) from [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8)
[   79.660000] [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) from [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254)
[   79.660000] [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) from [<c006bff8>] (handle_irq_event+0x3c/0x5c)
[   79.660000] [<c006bff8>] (handle_irq_event+0x3c/0x5c) from [<c006e6d0>] (handle_level_irq+0x90/0x110)
[   79.660000] [<c006e6d0>] (handle_level_irq+0x90/0x110) from [<c006b930>] (generic_handle_irq+0x38/0x50)
[   79.660000] [<c006b930>] (generic_handle_irq+0x38/0x50) from [<c00102fc>] (handle_IRQ+0x30/0x84)
[   79.660000] [<c00102fc>] (handle_IRQ+0x30/0x84) from [<c000f058>] (__irq_svc+0x38/0x60)
[   79.660000] [<c000f058>] (__irq_svc+0x38/0x60) from [<c0010520>] (default_idle+0x2c/0x40)
[   79.660000] [<c0010520>] (default_idle+0x2c/0x40) from [<c0010a90>] (cpu_idle+0x64/0xcc)
[   79.660000] [<c0010a90>] (cpu_idle+0x64/0xcc) from [<c04ff858>] (start_kernel+0x244/0x2c8)
[   79.660000] BUG: spinlock lockup on CPU#0, swapper/0
[   79.660000]  lock: c398cb2c, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0
[   79.660000] [<c0014bd0>] (unwind_backtrace+0x0/0xf4) from [<c01ddb1c>] (do_raw_spin_lock+0xf0/0x144)
[   79.660000] [<c01ddb1c>] (do_raw_spin_lock+0xf0/0x144) from [<c03a8468>] (_raw_spin_lock_irqsave+0x4c/0x58)
[   79.660000] [<c03a8468>] (_raw_spin_lock_irqsave+0x4c/0x58) from [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4)
[   79.660000] [<c026ea3c>] (mxs_mmc_enable_sdio_irq+0x18/0xd4) from [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8)
[   79.660000] [<c026f7fc>] (mxs_mmc_irq_handler+0xd4/0xe8) from [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254)
[   79.660000] [<c006bdd8>] (handle_irq_event_percpu+0x70/0x254) from [<c006bff8>] (handle_irq_event+0x3c/0x5c)
[   79.660000] [<c006bff8>] (handle_irq_event+0x3c/0x5c) from [<c006e6d0>] (handle_level_irq+0x90/0x110)
[   79.660000] [<c006e6d0>] (handle_level_irq+0x90/0x110) from [<c006b930>] (generic_handle_irq+0x38/0x50)
[   79.660000] [<c006b930>] (generic_handle_irq+0x38/0x50) from [<c00102fc>] (handle_IRQ+0x30/0x84)
[   79.660000] [<c00102fc>] (handle_IRQ+0x30/0x84) from [<c000f058>] (__irq_svc+0x38/0x60)
[   79.660000] [<c000f058>] (__irq_svc+0x38/0x60) from [<c0010520>] (default_idle+0x2c/0x40)
[   79.660000] [<c0010520>] (default_idle+0x2c/0x40) from [<c0010a90>] (cpu_idle+0x64/0xcc)
[   79.660000] [<c0010a90>] (cpu_idle+0x64/0xcc) from [<c04ff858>] (start_kernel+0x244/0x2c8)

Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 09:47:24 -07:00
..
accessibility
acpi ACPI: export symbol acpi_get_table_with_size 2012-09-14 10:00:39 -07:00
amba
ata ahci: Detect Marvell 88SE9172 SATA controller 2012-06-01 15:12:55 +08:00
atm solos-pci: Fix DMA support 2012-06-10 00:32:58 +09:00
auxdisplay
base mm: memory hotplug: Check if pages are correctly reserved on a per-section basis 2012-08-01 12:26:55 -07:00
bcma
block cciss: fix handling of protocol error 2012-10-02 09:47:23 -07:00
bluetooth Bluetooth: Add support for Foxconn/Hon Hai AR5BBU22 0489:E03C 2012-06-10 00:33:01 +09:00
cdrom cdrom: use copy_to_user() without the underscores 2012-02-29 16:34:35 -08:00
char random: mix in architectural randomness in extract_buf() 2012-08-15 12:04:29 -07:00
clk
clocksource
connector
cpufreq cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU 2012-10-02 09:47:22 -07:00
cpuidle
crypto crypto: mv_cesa requires on CRYPTO_HASH to build 2012-05-21 09:40:03 -07:00
dca
dio
dma dmaengine: at_hdmac: remove clear-on-read in atc_dostart() 2012-05-07 08:56:33 -07:00
edac x86: Simplify code by removing a !SMP #ifdefs from 'struct cpuinfo_x86' 2012-08-15 12:04:09 -07:00
eisa
firewire firewire: ohci: fix too-early completion of IR multichannel buffers 2012-04-02 09:27:13 -07:00
firmware dmi: Feed DMI table to /dev/random driver 2012-08-15 12:04:29 -07:00
gpio pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH 2012-05-21 09:40:05 -07:00
gpu drm/vmwgfx: add MODULE_DEVICE_TABLE so vmwgfx loads at boot 2012-09-14 10:00:51 -07:00
hid HID: add more hotkeys in Asus AIO keyboards 2012-04-02 09:27:12 -07:00
hwmon hwmon: (asus_atk0110) Add quirk for Asus M5A78L 2012-09-14 10:00:51 -07:00
hwspinlock hwspinlock/core: use a mutex to protect the radix tree 2011-11-11 09:36:31 -08:00
i2c i2c: davinci: Free requested IRQ in remove 2012-06-01 15:13:01 +08:00
ide block: add and use scsi_blk_cmd_ioctl 2012-01-25 17:24:54 -08:00
idle intel_idle: fix API misuse 2012-01-25 17:24:56 -08:00
ieee802154
infiniband IB/srp: Fix a race condition 2012-08-26 15:12:13 -07:00
input Input: i8042 - add Gigabyte T1005 series netbooks to noloop table 2012-09-14 10:00:51 -07:00
isdn isdnloop: fix and simplify isdnloop_init() 2012-10-02 09:47:05 -07:00
leds Revert "leds: save the delay values after a successful call to blink_set()" 2011-11-21 14:31:19 -08:00
lguest
macintosh
mca
md dm raid1: fix crash with mirror recovery and discard 2012-08-01 12:26:54 -07:00
media USB: smsusb: remove __devinit* from the struct usb_device_id table 2012-09-14 10:00:40 -07:00
memstick
message
mfd ARM: pxa: remove irq_to_gpio from ezx-pcap driver 2012-08-15 12:04:30 -07:00
misc pch_phub: Improve ADE(Address Decode Enable) control 2012-04-22 16:21:42 -07:00
mmc mmc: mxs-mmc: fix deadlock in SDIO IRQ case 2012-10-02 09:47:24 -07:00
mtd mtd: nandsim: don't open code a do_div helper 2012-07-19 08:58:20 -07:00
net netconsole: remove a redundant netconsole_target_put() 2012-10-02 09:47:23 -07:00
nfc
nubus
of
oprofile oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array 2012-07-16 08:47:48 -07:00
parisc
parport
pci PCI: EHCI: Fix crash during hibernation on ASUS computers 2012-09-14 10:00:39 -07:00
pcmcia pcmcia: fix socket refcount decrementing on each resume 2012-02-13 11:06:10 -08:00
platform intel_ips: blacklist HP ProBook laptops 2012-07-19 08:58:21 -07:00
pnp PNPACPI: Fix device ref leaking in acpi_pnp_match 2012-04-13 08:14:05 -07:00
power drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal 2011-11-11 09:36:32 -08:00
pps
ps3
ptp ptp: Fix clock_getres() implementation 2011-12-21 12:57:36 -08:00
rapidio rapidio: fix use of non-compatible registers 2011-10-03 11:39:46 -07:00
regulator regulator: Fix the logic to ensure new voltage setting in valid range 2012-05-21 09:39:58 -07:00
rtc rtc: wm831x: Feed the write counter into device_add_randomness() 2012-08-15 12:04:28 -07:00
s390 compat: Re-add missing asm/compat.h include to fix compile breakage on s390 2012-03-19 08:57:59 -07:00
sbus
scsi SCSI: Fix 'Device not ready' issue on mpt2sas 2012-09-14 10:00:50 -07:00
sfi
sh
sn
spi spi: Fix device unregistration when unregistering the bus master 2012-04-27 09:51:09 -07:00
ssb ssb: fix init regression with SoCs 2012-01-06 14:13:48 -08:00
staging staging: comedi: das08: Correct AO output for das08jr-16-ao 2012-10-02 09:47:24 -07:00
target target: Fix ->data_length re-assignment bug with SCSI overflow 2012-10-02 09:47:23 -07:00
tc
telephony
thermal
tty tty: Allow uart_register/unregister/register 2012-06-01 15:12:56 +08:00
uio
usb USB: option: replace ZTE K5006-Z entry with vendor class rule 2012-10-02 09:47:24 -07:00
uwb uwb: fix error handling 2012-04-27 09:51:06 -07:00
vhost vhost: don't forget to schedule() 2012-07-16 08:47:51 -07:00
video video:uvesafb: Fix oops that uvesafb try to execute NX-protected page 2012-04-22 16:21:24 -07:00
virtio virtio-pci: fix use after free 2011-11-21 14:31:14 -08:00
vlynq
w1 drivers/power/ds2780_battery.c: add a nolock function to w1 interface 2011-11-11 09:36:32 -08:00
watchdog watchdog: hpwdt: clean up set_memory_x call for 32 bit 2012-03-12 10:32:40 -07:00
xen xen/xenbus: Add quirk to deal with misconfigured backends. 2012-04-27 09:51:05 -07:00
zorro zorro: Defer device_register() until all devices have been identified 2011-10-03 11:40:57 -07:00
Kconfig
Makefile