Sudeep Holla
798523973d
usb: isp1760: fix possible deadlock in isp1760_udc_irq
Use spin_{un,}lock_irq{save,restore} in isp1760_udc_{start,stop} to
prevent following potentially deadlock scenario between
isp1760_udc_{start,stop} and isp1760_udc_irq :
=================================
[ INFO: inconsistent lock state ]
4.0.0-rc2-00004-gf7bb2ef60173 #51 Not tainted
---------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
in:imklog/2118 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&(&udc->lock)->rlock){?.+...}, at: [<c0397a93>] isp1760_udc_irq+0x367/0x9dc
{HARDIRQ-ON-W} state was registered at:
[<c05135b3>] _raw_spin_lock+0x23/0x30
[<c0396b87>] isp1760_udc_start+0x23/0xf8
[<c039dc21>] udc_bind_to_driver+0x71/0xb0
[<c039de4f>] usb_gadget_probe_driver+0x53/0x9c
[<bf80d0df>] usb_composite_probe+0x8a/0xa4 [libcomposite]
[<bf8311a7>] 0xbf8311a7
[<c00088c5>] do_one_initcall+0x8d/0x17c
[<c050b92d>] do_init_module+0x49/0x148
[<c0087323>] load_module+0xb7f/0xbc4
[<c0087471>] SyS_finit_module+0x51/0x74
[<c000d8c1>] ret_fast_syscall+0x1/0x68
irq event stamp: 4966
hardirqs last enabled at (4965): [<c05137df>] _raw_spin_unlock_irq+0x1f/0x24
hardirqs last disabled at (4966): [<c00110b3>] __irq_svc+0x33/0x64
softirqs last enabled at (4458): [<c0023475>] __do_softirq+0x23d/0x2d0
softirqs last disabled at (4389): [<c002380b>] irq_exit+0xef/0x15c
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&(&udc->lock)->rlock);
<Interrupt>
lock(&(&udc->lock)->rlock);
*** DEADLOCK ***
1 lock held by in:imklog/2118:
#0: (&f->f_pos_lock){+.+.+.}, at: [<c010a101>] __fdget_pos+0x31/0x34
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-03-09 10:44:08 -05:00
..
2015-03-06 01:29:16 +01:00
2015-02-10 10:23:15 +00:00
2015-03-01 18:43:51 -08:00
2015-02-12 14:30:53 -08:00
2015-03-06 01:29:31 +01:00
2015-02-28 10:21:57 -08:00
2015-02-23 09:30:35 +02:00
2015-02-17 09:27:54 -08:00
2015-02-19 20:58:42 -06:00
2015-03-04 22:11:17 +01:00
2015-02-25 10:28:55 +01:00
2015-02-04 10:42:55 -08:00
2015-03-06 13:43:33 -08:00
2015-03-05 23:13:19 +01:00
2015-02-18 08:49:20 -08:00
2015-02-13 21:39:06 +01:00
2015-03-05 22:15:35 +05:30
2015-02-19 11:18:14 -08:00
2015-02-02 21:56:03 +01:00
2015-03-02 14:18:57 +01:00
2015-02-23 15:40:32 +01:00
2015-03-07 07:40:17 +10:00
2015-02-23 15:28:40 +01:00
2015-02-15 10:48:44 -08:00
2015-02-22 20:10:30 -08:00
2015-03-07 01:08:26 +01:00
2015-02-15 19:40:09 +01:00
2015-02-28 07:19:27 -08:00
2015-02-22 17:42:14 -08:00
2015-02-21 12:59:04 -08:00
2015-02-12 09:16:56 -08:00
2015-02-21 19:41:38 -08:00
2015-03-03 15:30:07 -08:00
2015-02-02 14:36:10 -08:00
2015-02-18 09:24:01 -08:00
2015-02-11 12:56:40 -08:00
2015-02-03 15:48:51 -08:00
2015-02-25 11:38:46 +11:00
2015-02-11 17:06:05 -08:00
2015-02-03 15:58:39 -08:00
2015-02-18 09:05:48 -08:00
2015-03-01 19:34:50 -08:00
2015-02-21 12:30:30 -08:00
2015-02-18 08:01:44 -08:00
2015-03-03 15:30:07 -08:00
2015-02-04 09:15:18 +01:00
2015-02-18 09:43:46 -08:00
2015-02-28 00:47:00 +01:00
2015-02-17 09:38:59 -08:00
2015-02-15 10:24:55 -08:00
2015-02-11 11:23:13 -08:00
2015-02-21 11:12:07 -08:00
2015-02-21 04:29:16 +01:00
2015-02-18 08:40:29 +01:00
2015-02-18 08:49:20 -08:00
2015-02-18 09:05:48 -08:00
2015-03-06 01:29:05 +01:00
2015-02-13 09:55:09 -08:00
2015-02-21 19:16:42 -08:00
2015-02-24 07:26:12 +09:00
2015-02-17 09:38:59 -08:00
2015-02-19 10:36:45 -08:00
2015-02-11 14:38:29 -08:00
2015-03-01 19:25:59 -08:00
2015-02-21 13:21:19 -08:00
2015-03-05 01:47:57 -04:00
2015-03-08 12:25:40 -07:00
2015-03-09 10:44:08 -05:00
2015-02-15 10:24:55 -08:00
2015-02-10 12:38:14 -07:00
2015-03-03 15:30:07 -08:00
2015-02-11 17:06:05 -08:00
2015-02-17 16:19:29 +10:30
2015-03-06 00:46:31 +01:00
2015-02-23 16:30:25 +00:00
2015-02-03 15:58:39 -08:00