Brandon Philips
ad0b65efd1
USB: cdc-acm.c: fix recursive lock in acm_start_wb error path
Fixes an obvious bug in cdc-acm by avoiding a recursive lock on
acm_start_wb()'s error path. Should apply towards 2.6.27 stable and
2.6.28.
=============================================
[ INFO: possible recursive locking detected ]
2.6.27-2-pae #109
---------------------------------------------
python/31449 is trying to acquire lock:
(&acm->write_lock){++..}, at: [<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm]
but task is already holding lock:
(&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm]
other info that might help us debug this:
2 locks held by python/31449:
#0: (&tty->atomic_write_lock){--..}, at: [<c0260fae>] tty_write_lock+0x14/0x3b
#1: (&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm]
stack backtrace:
Pid: 31449, comm: python Not tainted 2.6.27-2-pae #109
[<c030f42f>] ? printk+0xf/0x18
[<c0149f33>] __lock_acquire+0xc7b/0x1316
[<c014a63e>] lock_acquire+0x70/0x97
[<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm]
[<c0312109>] _spin_lock_irqsave+0x37/0x47
[<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm]
[<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm]
[<f89a055d>] acm_tty_write+0x143/0x167 [cdc_acm]
[<c0262a98>] write_chan+0x1cd/0x297
[<c012527e>] ? default_wake_function+0x0/0xd
[<c026111e>] tty_write+0x149/0x1b9
[<c02628cb>] ? write_chan+0x0/0x297
[<c01912c5>] ? rw_verify_area+0x76/0x98
[<c0260fd5>] ? tty_write+0x0/0x1b9
[<c01919ba>] vfs_write+0x8c/0x136
[<c0191afd>] sys_write+0x3b/0x60
[<c0103beb>] sysenter_do_call+0x12/0x3f
=======================
Signed-off-by: Brandon Philips <bphilips@suse.de>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-13 14:45:02 -08:00
..
2008-11-11 21:17:26 -05:00
2008-11-11 03:01:21 -05:00
2008-10-29 15:03:49 -07:00
2008-11-06 15:41:18 -08:00
2008-10-31 00:40:19 -07:00
2008-10-28 17:46:02 +09:00
2008-11-12 17:17:16 -08:00
2008-10-20 13:14:06 +02:00
2008-11-09 16:28:42 -08:00
2008-11-10 15:01:03 -08:00
2008-11-11 13:12:33 -07:00
2008-11-12 17:17:16 -08:00
2008-10-31 08:48:25 +01:00
2008-11-07 08:25:43 -08:00
2008-11-12 17:17:16 -08:00
2008-11-11 18:03:28 +10:00
2008-11-11 08:09:43 -02:00
2008-11-12 17:17:17 -08:00
2008-10-30 15:55:47 +01:00
2008-11-02 21:40:10 +01:00
2008-10-28 00:14:47 -04:00
2008-11-06 15:55:34 -08:00
2008-11-12 10:56:31 -08:00
2008-11-01 09:49:46 -07:00
2008-11-01 09:50:12 -07:00
2008-11-06 19:41:24 +11:00
2008-11-11 08:11:33 -02:00
2008-10-21 07:48:33 -04:00
2008-11-07 08:25:43 -08:00
2008-11-01 12:40:38 -07:00
2008-11-12 17:17:18 -08:00
2008-11-08 21:37:46 +01:00
2008-11-13 15:05:03 +00:00
2008-11-12 16:41:27 -08:00
2008-10-31 16:12:01 +11:00
2008-10-27 19:15:41 +01:00
2008-10-21 07:47:06 -04:00
2008-10-30 12:52:53 -07:00
2008-11-11 13:33:05 -08:00
2008-10-31 16:18:02 +09:00
2008-11-04 08:18:19 -08:00
2008-10-20 09:44:30 -07:00
2008-11-05 19:59:08 +11:00
2008-11-09 14:49:23 +00:00
2008-11-12 17:17:18 -08:00
2008-10-30 11:46:28 -07:00
2008-11-04 08:18:19 -08:00
2008-11-01 09:49:46 -07:00
2008-11-06 15:41:19 -08:00
2008-11-12 17:17:17 -08:00
2008-11-10 13:50:17 -08:00
2008-11-09 12:47:04 -08:00
2008-11-11 09:30:23 -08:00
2008-11-01 09:49:46 -07:00
2008-11-13 14:45:02 -08:00
2008-10-20 14:37:53 +01:00
2008-11-06 15:41:19 -08:00
2008-11-12 17:17:18 -08:00
2008-11-11 09:24:31 -08:00
2008-11-04 08:18:19 -08:00
2008-10-28 21:47:17 +00:00
2008-10-26 16:35:46 -07:00