Herton Ronaldo Krzesinski
6a8171f261
rtl8187: fix circular locking (rtl8187_stop/rtl8187_work)
...
Larry Finger reports following lockdep warning:
[ INFO: possible circular locking dependency detected ]
2.6.31-rc6-wl #201
-------------------------------------------------------
rfkill/30578 is trying to acquire lock:
(&(&priv->work)->work#2){+.+...}, at: [<ffffffff81051215>]
__cancel_work_timer+0xd9/0x222
but task is already holding lock:
(&priv->conf_mutex#2){+.+.+.}, at: [<ffffffffa064a024>]
rtl8187_stop+0x31/0x364 [rtl8187]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&priv->conf_mutex#2){+.+.+.}:
[<ffffffff81065957>] __lock_acquire+0x12d0/0x1614
[<ffffffff81065d54>] lock_acquire+0xb9/0xdd
[<ffffffff8127c32f>] mutex_lock_nested+0x56/0x2a8
[<ffffffffa064a392>] rtl8187_work+0x3b/0xf2 [rtl8187]
[<ffffffff81050758>] worker_thread+0x1fa/0x30a
[<ffffffff81054ca5>] kthread+0x8f/0x97
[<ffffffff8100cb7a>] child_rip+0xa/0x20
[<ffffffffffffffff>] 0xffffffffffffffff
-> #0 (&(&priv->work)->work#2){+.+...}:
[<ffffffff8106568c>] __lock_acquire+0x1005/0x1614
[<ffffffff81065d54>] lock_acquire+0xb9/0xdd
[<ffffffff8105124e>] __cancel_work_timer+0x112/0x222
[<ffffffff8105136b>] cancel_delayed_work_sync+0xd/0xf
[<ffffffffa064a33f>] rtl8187_stop+0x34c/0x364 [rtl8187]
[<ffffffffa0242866>] ieee80211_stop_device+0x29/0x61 [mac80211]
[<ffffffffa0239194>] ieee80211_stop+0x476/0x530 [mac80211]
[<ffffffff8120ce15>] dev_close+0x8a/0xac
[<ffffffffa01d9fa7>] cfg80211_rfkill_set_block+0x4a/0x7a [cfg80211]
[<ffffffffa01bf4f0>] rfkill_set_block+0x84/0xd9 [rfkill]
[<ffffffffa01bfc31>] rfkill_fop_write+0xda/0x124 [rfkill]
[<ffffffff810cf286>] vfs_write+0xae/0x14a
[<ffffffff810cf3e6>] sys_write+0x47/0x6e
[<ffffffff8100ba6b>] system_call_fastpath+0x16/0x1b
[<ffffffffffffffff>] 0xffffffffffffffff
The problem here is that rtl8187_stop, while helding priv->conf_mutex,
runs cancel_delayed_work_sync on an workqueue that runs rtl8187_work,
which also takes priv->conf_mutex lock. Move cancel_delayed_work_sync
out of rtl8187_stop priv->conf_mutex locking region.
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:51 -04:00
..
2009-07-05 19:16:04 -07:00
2009-07-08 10:30:03 -07:00
2009-08-13 16:26:13 -07:00
2009-08-12 17:44:53 -07:00
2009-08-01 23:11:44 -07:00
2009-08-09 21:45:31 -07:00
2009-08-17 17:48:29 -07:00
2009-08-13 16:43:32 -07:00
2009-08-13 19:59:44 -07:00
2009-05-29 01:46:26 -07:00
2009-07-05 19:16:04 -07:00
2009-08-05 20:28:27 -07:00
2009-08-26 15:36:51 -07:00
2009-08-09 21:45:38 -07:00
2009-08-04 11:48:39 -07:00
2009-05-29 01:46:26 -07:00
2009-07-23 19:03:51 -07:00
2009-08-12 17:44:53 -07:00
2009-07-23 19:03:51 -07:00
2009-08-26 15:36:50 -07:00
2009-08-12 17:44:53 -07:00
2009-08-12 17:44:53 -07:00
2009-08-01 23:11:59 -07:00
2009-08-26 15:36:50 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 17:44:53 -07:00
2009-08-12 21:54:59 -07:00
2009-08-26 15:29:21 -07:00
2009-08-12 21:54:57 -07:00
2009-08-26 15:48:06 -07:00
2009-08-01 23:12:03 -07:00
2009-06-11 02:47:11 -07:00
2009-07-05 19:23:38 -07:00
2009-08-12 21:54:54 -07:00
2009-08-12 17:44:53 -07:00
2009-08-14 09:14:04 -04:00
2009-08-05 13:10:46 -07:00
2009-08-13 16:26:10 -07:00
2009-07-26 19:25:47 -07:00
2009-08-28 14:40:51 -04:00
2009-08-12 17:44:53 -07:00
2009-07-05 19:23:38 -07:00
2008-12-08 01:14:16 -08:00
2009-05-26 20:35:02 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-30 19:22:43 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:23:38 -07:00
2009-08-13 19:59:44 -07:00
2009-07-16 20:21:24 -07:00
2009-04-16 02:20:06 -07:00
2008-11-25 18:12:49 -08:00
2009-04-24 04:45:33 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 17:44:53 -07:00
2009-03-27 00:46:54 -07:00
2009-05-29 01:46:27 -07:00
2009-01-04 16:10:02 -08:00
2009-07-05 19:16:04 -07:00
2008-11-25 18:25:32 -08:00
2009-07-05 19:16:04 -07:00
2009-07-30 19:22:43 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2008-10-08 16:29:57 -07:00
2009-03-24 23:32:03 -07:00
2009-08-02 12:54:18 -07:00
2009-06-15 03:02:23 -07:00
2009-07-05 19:16:04 -07:00
2008-10-08 16:29:57 -07:00
2009-08-12 17:44:53 -07:00
2009-04-04 16:51:14 -07:00
2009-08-22 17:48:55 -07:00
2009-08-22 17:48:54 -07:00
2009-08-12 23:03:00 -07:00
2009-08-12 22:53:28 -07:00
2009-04-27 03:27:43 -07:00
2009-08-12 23:02:12 -07:00
2009-08-12 23:02:59 -07:00
2009-08-12 23:02:59 -07:00
2009-08-12 23:03:01 -07:00
2009-08-12 23:02:57 -07:00
2009-08-12 23:03:02 -07:00
2009-08-12 23:03:01 -07:00
2009-08-12 23:03:01 -07:00
2009-07-05 19:16:04 -07:00
2009-06-09 10:22:42 -05:00
2009-06-21 11:00:33 -05:00
2009-07-27 11:25:58 -07:00
2009-06-09 10:22:42 -05:00
2009-08-05 12:22:11 -07:00
2009-08-12 21:54:56 -07:00
2009-07-08 10:46:44 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:23:38 -07:00
2009-07-05 19:23:38 -07:00
2009-07-08 10:30:03 -07:00
2009-07-23 18:01:01 -07:00
2009-07-06 18:54:51 -07:00
2009-07-05 19:16:04 -07:00
2009-03-11 23:26:02 -07:00
2009-07-05 19:16:04 -07:00
2009-07-16 20:21:24 -07:00
2009-02-17 17:21:08 -08:00
2009-07-30 19:22:43 -07:00
2009-07-30 19:22:43 -07:00
2008-12-29 18:42:33 -08:00
2009-07-05 19:16:04 -07:00
2009-08-12 17:44:53 -07:00
2009-07-05 19:16:04 -07:00
2008-11-25 18:23:59 -08:00
2009-07-05 19:16:04 -07:00
2009-07-27 11:35:28 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 17:44:53 -07:00
2009-06-18 11:22:08 +10:00
2009-06-18 11:22:08 +10:00
2009-08-12 17:44:53 -07:00
2009-07-06 18:56:11 -07:00
2009-07-05 18:03:33 -07:00
2009-06-25 20:03:53 -07:00
2009-02-04 16:42:35 -08:00
2009-07-30 14:20:42 -07:00
2009-02-04 16:43:44 -08:00
2009-08-12 17:44:53 -07:00
2009-06-03 02:43:41 -07:00
2009-08-12 17:44:53 -07:00
2009-07-05 19:16:04 -07:00
2009-02-26 21:02:19 -08:00
2008-11-25 18:24:57 -08:00
2009-04-16 02:20:08 -07:00
2009-01-11 00:06:36 -08:00
2009-06-13 01:18:32 -07:00
2009-07-05 19:16:04 -07:00
2009-01-06 10:47:44 -08:00
2009-07-05 19:23:38 -07:00
2009-07-05 19:16:04 -07:00
2009-04-07 08:31:11 -07:00
2009-06-12 18:01:46 +02:00
2009-07-16 20:21:24 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 21:54:57 -07:00
2009-07-06 13:05:11 -07:00
2009-07-06 13:05:13 -07:00
2009-08-20 02:52:16 -07:00
2009-08-13 16:26:12 -07:00
2009-06-08 00:20:20 -07:00
2009-07-20 08:23:26 -07:00
2009-07-20 08:23:26 -07:00
2009-07-05 19:16:04 -07:00
2009-05-05 12:29:47 -07:00
2009-07-05 19:23:38 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-04-27 02:53:52 -07:00
2009-04-27 02:53:52 -07:00
2008-11-25 18:24:38 -08:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-06-03 02:43:41 -07:00
2009-07-05 19:16:04 -07:00
2008-10-08 16:29:57 -07:00
2009-07-05 19:16:04 -07:00
2009-04-16 02:20:16 -07:00
2009-07-23 18:01:09 -07:00
2009-06-11 02:32:39 -07:00
2009-08-20 02:52:16 -07:00
2009-06-25 20:06:34 -07:00
2009-07-23 18:01:06 -07:00
2009-04-29 17:32:42 -07:00
2009-07-05 19:16:04 -07:00
2009-06-19 01:12:52 -07:00
2009-04-16 02:20:21 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 17:44:53 -07:00
2008-11-28 15:55:00 -08:00
2009-05-03 14:19:23 -07:00
2009-05-01 15:21:55 -07:00
2009-01-11 00:06:36 -08:00
2009-07-08 10:30:03 -07:00
2009-05-01 15:24:18 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:23:38 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 21:54:53 -07:00
2009-06-12 18:01:45 +02:00
2009-06-13 01:18:50 -07:00
2008-11-12 23:38:14 -08:00
2009-04-27 03:20:17 -07:00
2009-04-27 02:53:49 -07:00
2009-08-12 17:44:53 -07:00
2009-08-12 17:44:53 -07:00
2009-07-16 20:21:24 -07:00
2009-07-16 09:14:23 -07:00
2009-08-19 13:55:55 -07:00
2009-07-16 09:14:23 -07:00
2009-08-12 16:39:16 -07:00
2009-08-02 12:20:34 -07:00
2009-01-21 15:55:15 -08:00
2009-07-12 14:20:02 -07:00
2009-07-12 14:20:02 -07:00
2008-11-10 15:11:56 -05:00
2009-06-23 16:36:27 -07:00
2009-08-23 19:16:32 -07:00
2009-08-12 22:13:23 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-04-29 17:32:34 -07:00
2009-08-01 23:12:06 -07:00
2009-06-08 00:20:22 -07:00
2009-08-02 12:20:40 -07:00
2009-07-05 19:16:04 -07:00
2009-07-23 18:01:07 -07:00
2009-07-20 08:27:02 -07:00
2009-07-05 19:16:04 -07:00
2009-07-23 18:01:04 -07:00
2009-07-05 19:16:04 -07:00
2009-05-25 22:49:56 -07:00
2009-06-17 18:46:46 -07:00
2009-07-05 19:16:04 -07:00
2009-07-22 11:24:26 -07:00
2009-08-18 20:26:54 -07:00
2009-08-18 20:26:53 -07:00
2009-07-05 19:16:04 -07:00
2009-01-06 11:28:06 +01:00
2009-07-16 20:21:24 -07:00
2009-07-26 19:15:07 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 22:13:16 -07:00
2009-07-05 19:16:04 -07:00
2009-05-01 15:21:55 -07:00
2009-03-27 00:46:47 -07:00
2009-03-27 00:46:48 -07:00
2009-08-06 13:25:31 -07:00
2009-03-19 23:59:27 -07:00
2009-04-07 08:31:11 -07:00
2009-02-20 00:38:51 -08:00
2009-07-05 19:23:38 -07:00
2008-11-12 23:38:36 -08:00
2008-11-12 23:38:36 -08:00
2009-03-23 14:42:09 -07:00
2009-08-12 17:44:53 -07:00
2008-11-25 18:25:49 -08:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-08-12 17:44:53 -07:00
2009-02-02 23:19:50 -08:00
2009-04-07 08:31:11 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-05 19:16:04 -07:00
2009-07-12 14:20:04 -07:00
2009-08-06 13:14:25 -07:00
2009-06-11 02:47:14 -07:00
2009-04-07 08:31:11 -07:00
2009-08-26 15:48:08 -07:00
2009-08-26 15:48:00 -07:00
2009-07-05 19:16:04 -07:00
2009-07-08 10:30:03 -07:00
2009-08-12 17:44:53 -07:00
2009-07-05 19:16:04 -07:00
2009-01-21 14:34:08 -08:00
2009-06-12 18:01:46 +02:00
2009-07-23 19:03:51 -07:00
2009-07-07 19:22:09 -07:00
2009-07-23 18:01:02 -07:00
2009-07-16 20:21:24 -07:00
2009-07-23 18:11:12 -07:00
2009-07-23 18:11:28 -07:00
2009-07-17 10:10:58 -07:00
2009-01-11 00:06:36 -08:00
2009-07-05 19:16:04 -07:00
2009-08-20 02:52:16 -07:00
2009-07-23 18:01:08 -07:00
2009-08-12 17:44:53 -07:00
2009-07-05 19:16:04 -07:00
2009-08-09 21:46:53 -07:00