From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from he.sipsolutions.net ([78.46.109.217]:58789 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934176Ab1JELDf (ORCPT ); Wed, 5 Oct 2011 07:03:35 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1RBPG9-0006Fy-Pe for linux-wireless@vger.kernel.org; Wed, 05 Oct 2011 13:03:34 +0200 Subject: b43 lockdep splat From: Johannes Berg To: linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Date: Wed, 05 Oct 2011 13:03:32 +0200 Message-ID: <1317812612.4839.4.camel@jlt3.sipsolutions.net> (sfid-20111005_130339_064173_61B07A27) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: [16922.681811] ======================================================= [16922.681817] [ INFO: possible circular locking dependency detected ] [16922.681821] 3.1.0-rc7-wl-65981-g1564861-dirty #244 [16922.681824] ------------------------------------------------------- [16922.681828] NetworkManager/11520 is trying to acquire lock: [16922.681832] (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 [16922.681845] [16922.681846] but task is already holding lock: [16922.681849] (rfkill_global_mutex){+.+.+.}, at: [] rfkill_fop_write+0x7d/0x170 [rfkill] [16922.681862] [16922.681863] which lock already depends on the new lock. [16922.681864] [16922.681867] [16922.681868] the existing dependency chain (in reverse order) is: [16922.681871] [16922.681872] -> #4 (rfkill_global_mutex){+.+.+.}: [16922.681880] [] check_prevs_add+0xf8/0x180 [16922.681888] [] validate_chain.isra.33+0x4a4/0x5d0 [16922.681895] [] __lock_acquire+0x40c/0xa50 [16922.681901] [] lock_acquire+0x9e/0x1f0 [16922.681907] [] mutex_lock_nested+0x73/0x3b0 [16922.681913] [] rfkill_fop_open+0x95/0x220 [rfkill] [16922.681921] [] misc_open+0x1e9/0x630 [16922.681928] [] chrdev_open+0x127/0x330 [16922.681935] [] __dentry_open.isra.14+0x151/0x470 [16922.681942] [] nameidata_to_filp+0x61/0x70 [16922.681948] [] do_last.isra.46+0x32b/0x650 [16922.681954] [] path_openat+0xce/0x3a0 [16922.681959] [] do_filp_open+0x42/0xa0 [16922.681965] [] do_sys_open+0xf7/0x1d0 [16922.681970] [] sys_open+0x20/0x30 [16922.681976] [] system_call_fastpath+0x16/0x1b [16922.681983] [16922.681984] -> #3 (misc_mtx){+.+.+.}: [16922.681990] [] check_prevs_add+0xf8/0x180 [16922.681996] [] validate_chain.isra.33+0x4a4/0x5d0 [16922.682003] [] __lock_acquire+0x40c/0xa50 [16922.682008] [] lock_acquire+0x9e/0x1f0 [16922.682014] [] mutex_lock_nested+0x73/0x3b0 [16922.682020] [] misc_register+0x2b/0x90 [16922.682026] [] hwrng_register+0x101/0x190 [16922.682031] [] b43_wireless_core_init+0x468/0x5e0 [b43] [16922.682045] [] b43_op_start+0x1d8/0x1f0 [b43] [16922.682056] [] ieee80211_do_open+0x27d/0x1160 [mac80211] [16922.682082] [] ieee80211_open+0x6d/0x80 [mac80211] [16922.682102] [] __dev_open+0x8f/0xe0 [16922.682108] [] __dev_change_flags+0xa1/0x180 [16922.682114] [] dev_change_flags+0x28/0x70 [16922.682119] [] do_setlink+0x267/0x7d0 [16922.682125] [] rtnl_setlink+0xc9/0x120 [16922.682130] [] rtnetlink_rcv_msg+0x124/0x2e0 [16922.682135] [] netlink_rcv_skb+0xa9/0xd0 [16922.682142] [] rtnetlink_rcv+0x25/0x40 [16922.682148] [] netlink_unicast+0x1ee/0x240 [16922.682153] [] netlink_sendmsg+0x2ca/0x360 [16922.682159] [] sock_sendmsg+0xde/0x120 [16922.682166] [] __sys_sendmsg+0x3b5/0x3d0 [16922.682171] [] sys_sendmsg+0x49/0x90 [16922.682177] [] system_call_fastpath+0x16/0x1b [16922.682183] [16922.682184] -> #2 (rng_mutex){+.+.+.}: [16922.682191] [] check_prevs_add+0xf8/0x180 [16922.682197] [] validate_chain.isra.33+0x4a4/0x5d0 [16922.682203] [] __lock_acquire+0x40c/0xa50 [16922.682209] [] lock_acquire+0x9e/0x1f0 [16922.682215] [] mutex_lock_nested+0x73/0x3b0 [16922.682220] [] hwrng_register+0x38/0x190 [16922.682226] [] b43_wireless_core_init+0x468/0x5e0 [b43] [16922.682237] [] b43_op_start+0x1d8/0x1f0 [b43] [16922.682248] [] ieee80211_do_open+0x27d/0x1160 [mac80211] [16922.682268] [] ieee80211_open+0x6d/0x80 [mac80211] [16922.682287] [] __dev_open+0x8f/0xe0 [16922.682293] [] __dev_change_flags+0xa1/0x180 [16922.682298] [] dev_change_flags+0x28/0x70 [16922.682304] [] do_setlink+0x267/0x7d0 [16922.682309] [] rtnl_setlink+0xc9/0x120 [16922.682315] [] rtnetlink_rcv_msg+0x124/0x2e0 [16922.682320] [] netlink_rcv_skb+0xa9/0xd0 [16922.682326] [] rtnetlink_rcv+0x25/0x40 [16922.682331] [] netlink_unicast+0x1ee/0x240 [16922.682337] [] netlink_sendmsg+0x2ca/0x360 [16922.682343] [] sock_sendmsg+0xde/0x120 [16922.682349] [] __sys_sendmsg+0x3b5/0x3d0 [16922.682354] [] sys_sendmsg+0x49/0x90 [16922.682360] [] system_call_fastpath+0x16/0x1b [16922.682366] [16922.682367] -> #1 (&wl->mutex){+.+.+.}: [16922.682373] [] check_prevs_add+0xf8/0x180 [16922.682380] [] validate_chain.isra.33+0x4a4/0x5d0 [16922.682386] [] __lock_acquire+0x40c/0xa50 [16922.682392] [] lock_acquire+0x9e/0x1f0 [16922.682398] [] mutex_lock_nested+0x73/0x3b0 [16922.682403] [] b43_op_start+0xde/0x1f0 [b43] [16922.682414] [] ieee80211_do_open+0x27d/0x1160 [mac80211] [16922.682434] [] ieee80211_open+0x6d/0x80 [mac80211] [16922.682453] [] __dev_open+0x8f/0xe0 [16922.682459] [] __dev_change_flags+0xa1/0x180 [16922.682464] [] dev_change_flags+0x28/0x70 [16922.682470] [] do_setlink+0x267/0x7d0 [16922.682475] [] rtnl_setlink+0xc9/0x120 [16922.682480] [] rtnetlink_rcv_msg+0x124/0x2e0 [16922.682486] [] netlink_rcv_skb+0xa9/0xd0 [16922.682492] [] rtnetlink_rcv+0x25/0x40 [16922.682497] [] netlink_unicast+0x1ee/0x240 [16922.682503] [] netlink_sendmsg+0x2ca/0x360 [16922.682509] [] sock_sendmsg+0xde/0x120 [16922.682515] [] __sys_sendmsg+0x3b5/0x3d0 [16922.682520] [] sys_sendmsg+0x49/0x90 [16922.682526] [] system_call_fastpath+0x16/0x1b [16922.682532] [16922.682533] -> #0 (rtnl_mutex){+.+.+.}: [16922.682539] [] check_prev_add+0x759/0x770 [16922.682545] [] check_prevs_add+0xf8/0x180 [16922.682551] [] validate_chain.isra.33+0x4a4/0x5d0 [16922.682557] [] __lock_acquire+0x40c/0xa50 [16922.682563] [] lock_acquire+0x9e/0x1f0 [16922.682569] [] mutex_lock_nested+0x73/0x3b0 [16922.682574] [] rtnl_lock+0x17/0x20 [16922.682580] [] cfg80211_rfkill_set_block+0x3d/0xa0 [cfg80211] [16922.682592] [] rfkill_set_block+0x87/0x120 [rfkill] [16922.682600] [] rfkill_fop_write+0xeb/0x170 [rfkill] [16922.682607] [] vfs_write+0xb2/0x180 [16922.682613] [] sys_write+0x4d/0x90 [16922.682618] [] system_call_fastpath+0x16/0x1b [16922.682624] [16922.682625] other info that might help us debug this: [16922.682626] [16922.682629] Chain exists of: [16922.682630] rtnl_mutex --> misc_mtx --> rfkill_global_mutex [16922.682640] [16922.682642] Possible unsafe locking scenario: [16922.682644] [16922.682646] CPU0 CPU1 [16922.682649] ---- ---- [16922.682652] lock(rfkill_global_mutex); [16922.682657] lock(misc_mtx); [16922.682662] lock(rfkill_global_mutex); [16922.682667] lock(rtnl_mutex); [16922.682672] [16922.682673] *** DEADLOCK *** [16922.682674] [16922.682678] 1 lock held by NetworkManager/11520: [16922.682681] #0: (rfkill_global_mutex){+.+.+.}, at: [] rfkill_fop_write+0x7d/0x170 [rfkill] [16922.682693] [16922.682694] stack backtrace: [16922.682698] Pid: 11520, comm: NetworkManager Not tainted 3.1.0-rc7-wl-65981-g1564861-dirty #244 [16922.682702] Call Trace: [16922.682709] [] print_circular_bug+0xd9/0xea [16922.682716] [] check_prev_add+0x759/0x770 [16922.682723] [] ? sched_clock_cpu+0xa8/0x120 [16922.682729] [] check_prevs_add+0xf8/0x180 [16922.682735] [] validate_chain.isra.33+0x4a4/0x5d0 [16922.682742] [] __lock_acquire+0x40c/0xa50 [16922.682748] [] ? sched_clock_local+0x25/0x90 [16922.682755] [] ? native_sched_clock+0x26/0x70 [16922.682761] [] lock_acquire+0x9e/0x1f0 [16922.682766] [] ? rtnl_lock+0x17/0x20 [16922.682772] [] ? sub_preempt_count.part.150+0xe/0xa0 [16922.682779] [] mutex_lock_nested+0x73/0x3b0 [16922.682784] [] ? rtnl_lock+0x17/0x20 [16922.682789] [] ? mark_held_locks+0x65/0x160 [16922.682797] [] ? rfkill_set_block+0x78/0x120 [rfkill] [16922.682802] [] ? rtnl_lock+0x17/0x20 [16922.682808] [] ? _raw_spin_unlock_irqrestore+0x65/0x80 [16922.682814] [] rtnl_lock+0x17/0x20 [16922.682823] [] cfg80211_rfkill_set_block+0x3d/0xa0 [cfg80211] [16922.682832] [] rfkill_set_block+0x87/0x120 [rfkill] [16922.682840] [] rfkill_fop_write+0xeb/0x170 [rfkill] [16922.682846] [] vfs_write+0xb2/0x180 [16922.682851] [] sys_write+0x4d/0x90 [16922.682856] [] system_call_fastpath+0x16/0x1b