Lauri Hintsala
1af36b2a99
mmc: mxs-mmc: fix deadlock in SDIO IRQ case
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-09-04 13:58:05 -04:00
..
2012-07-30 11:54:53 -07:00
2012-07-27 15:14:26 -07:00
2012-08-02 11:50:24 -07:00
2012-08-01 10:26:23 -07:00
2012-07-27 11:15:03 -04:00
2012-08-01 09:06:47 -07:00
2012-07-17 14:49:24 -03:00
2012-07-31 19:07:42 -07:00
2012-07-30 17:25:13 -07:00
2012-07-23 16:31:31 -07:00
2012-07-16 23:23:52 -07:00
2012-07-30 09:45:53 -07:00
2012-07-26 14:28:55 -07:00
2012-07-31 19:07:42 -07:00
2012-08-02 11:45:42 -07:00
2012-07-29 21:11:05 -03:00
2012-07-30 12:41:17 -07:00
2012-07-30 09:32:39 -07:00
2012-07-31 19:07:42 -07:00
2012-07-30 12:41:17 -07:00
2012-07-30 10:06:23 -07:00
2012-07-31 18:47:44 -07:00
2012-07-31 19:07:42 -07:00
2012-07-30 10:10:26 -07:00
2012-07-31 19:07:42 -07:00
2012-07-26 14:28:55 -07:00
2012-07-12 07:54:45 -07:00
2012-07-15 17:33:17 +01:00
2012-07-30 07:47:27 -07:00
2012-07-31 19:07:42 -07:00
2012-07-24 16:24:11 -07:00
2012-07-29 23:18:30 -07:00
2012-07-27 08:16:07 +08:00
2012-08-02 11:34:40 -07:00
2012-07-31 18:47:44 -07:00
2012-07-30 17:25:17 -07:00
2012-07-31 19:07:42 -07:00
2012-07-30 17:25:34 -07:00
2012-09-04 13:58:05 -04:00
2012-08-01 16:41:07 -07:00
2012-08-02 11:52:39 -07:00
2012-07-24 14:07:22 -07:00
2012-07-24 16:17:07 -07:00
2012-07-24 16:17:07 -07:00
2012-07-27 15:14:26 -07:00
2012-07-24 14:05:46 -07:00
2012-07-31 23:27:31 -04:00
2012-08-02 11:52:39 -07:00
2012-07-30 17:25:21 -07:00
2012-07-26 07:45:20 +02:00
2012-07-31 00:51:09 +02:00
2012-07-26 16:19:08 -07:00
2012-07-26 16:19:08 -07:00
2012-07-31 19:25:39 -07:00
2012-07-26 18:09:01 -07:00
2012-08-01 09:02:41 -07:00
2012-08-01 17:14:52 +09:00
2012-08-01 16:41:07 -07:00
2012-08-02 11:52:39 -07:00
2012-08-01 10:26:23 -07:00
2012-07-31 18:08:25 -07:00
2012-08-01 13:48:54 +09:00
2012-08-01 10:26:23 -07:00
2012-07-31 08:16:24 -06:00
2012-07-22 01:22:23 +03:00
2012-08-01 10:45:12 -07:00
2012-07-20 08:59:03 +01:00
2012-07-19 15:39:39 -07:00
2012-07-26 11:25:33 -07:00
2012-08-02 11:50:24 -07:00
2012-07-24 16:17:07 -07:00
2012-07-31 08:16:22 -06:00
2012-07-31 08:16:22 -06:00