Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751948Ab0H0ITP (ORCPT ); Fri, 27 Aug 2010 04:19:15 -0400 Received: from he.sipsolutions.net ([78.46.109.217]:40481 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291Ab0H0ITM (ORCPT ); Fri, 27 Aug 2010 04:19:12 -0400 Subject: Re: 2.6.36-rc2-git4 - INFO: possible circular locking dependency detected From: Johannes Berg To: Miles Lane Cc: LKML , linux-wireless , Maxime Bizon In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 27 Aug 2010 10:19:08 +0200 Message-ID: <1282897148.4377.1.camel@jlt3.sipsolutions.net> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5619 Lines: 127 This is due to commit 5a652052fedbd7869572c757dd2ffc2ed420c69d Author: Maxime Bizon Date: Wed Jul 21 17:21:38 2010 +0200 cfg80211: fix race between sysfs and cfg80211 The rfkill registration needs to be done after dropping all locks in wiphy_register(). Maxime, can you please look at fixing this? [full lockdep report preserved below] johannes On Thu, 2010-08-26 at 21:56 -0400, Miles Lane wrote: > [ INFO: possible circular locking dependency detected ] > 2.6.36-rc2-git4 #12 > ------------------------------------------------------- > kworker/0:3/3630 is trying to acquire lock: > (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x12/0x14 > > but task is already holding lock: > (rfkill_global_mutex){+.+.+.}, at: [] > rfkill_switch_all+0x24/0x49 [rfkill] > > which lock already depends on the new lock. > > > the existing dependency chain (in reverse order) is: > > -> #2 (rfkill_global_mutex){+.+.+.}: > [] lock_acquire+0x120/0x15b > [] __mutex_lock_common+0x54/0x52e > [] mutex_lock_nested+0x34/0x39 > [] rfkill_register+0x2b/0x29c [rfkill] > [] wiphy_register+0x1ae/0x270 [cfg80211] > [] ieee80211_register_hw+0x1b4/0x3cf [mac80211] > [] iwl_ucode_callback+0x9e9/0xae3 [iwlagn] > [] request_firmware_work_func+0x54/0x6f > [] kthread+0x8c/0x94 > [] kernel_thread_helper+0x4/0x10 > > -> #1 (cfg80211_mutex){+.+.+.}: > [] lock_acquire+0x120/0x15b > [] __mutex_lock_common+0x54/0x52e > [] mutex_lock_nested+0x34/0x39 > [] cfg80211_get_dev_from_ifindex+0x1b/0x7c [cfg80211] > [] cfg80211_wext_giwscan+0x58/0x990 [cfg80211] > [] ioctl_standard_iw_point+0x1a8/0x272 > [] ioctl_standard_call+0x91/0xa7 > [] T.723+0xbd/0x12c > [] wext_handle_ioctl+0x31/0x6d > [] dev_ioctl+0x63d/0x67a > [] sock_ioctl+0x48/0x21d > [] do_vfs_ioctl+0x4ba/0x509 > [] sys_ioctl+0x51/0x74 > [] system_call_fastpath+0x16/0x1b > > -> #0 (rtnl_mutex){+.+.+.}: > [] __lock_acquire+0xa93/0xd9a > [] lock_acquire+0x120/0x15b > [] __mutex_lock_common+0x54/0x52e > [] mutex_lock_nested+0x34/0x39 > [] rtnl_lock+0x12/0x14 > [] cfg80211_rfkill_set_block+0x1a/0x7b [cfg80211] > [] rfkill_set_block+0x80/0xd5 [rfkill] > [] __rfkill_switch_all+0x3f/0x6f [rfkill] > [] rfkill_switch_all+0x38/0x49 [rfkill] > [] rfkill_op_handler+0x105/0x136 [rfkill] > [] process_one_work+0x248/0x403 > [] worker_thread+0x139/0x214 > [] kthread+0x8c/0x94 > [] kernel_thread_helper+0x4/0x10 > > other info that might help us debug this: > > 3 locks held by kworker/0:3/3630: > #0: (events){+.+.+.}, at: [] process_one_work+0x178/0x403 > #1: ((rfkill_op_work).work){+.+...}, at: [] > process_one_work+0x178/0x403 > #2: (rfkill_global_mutex){+.+.+.}, at: [] > rfkill_switch_all+0x24/0x49 [rfkill] > > stack backtrace: > Pid: 3630, comm: kworker/0:3 Not tainted 2.6.36-rc2-git4 #12 > Call Trace: > [] print_circular_bug+0xa8/0xb7 > [] __lock_acquire+0xa93/0xd9a > [] ? __bfs+0x23/0x1d8 > [] ? rtnl_lock+0x12/0x14 > [] lock_acquire+0x120/0x15b > [] ? rtnl_lock+0x12/0x14 > [] ? rtnl_lock+0x12/0x14 > [] __mutex_lock_common+0x54/0x52e > [] ? rtnl_lock+0x12/0x14 > [] ? rfkill_switch_all+0x24/0x49 [rfkill] > [] ? mark_lock+0x2d/0x233 > [] ? rfkill_op_handler+0x0/0x136 [rfkill] > [] mutex_lock_nested+0x34/0x39 > [] rtnl_lock+0x12/0x14 > [] cfg80211_rfkill_set_block+0x1a/0x7b [cfg80211] > [] rfkill_set_block+0x80/0xd5 [rfkill] > [] __rfkill_switch_all+0x3f/0x6f [rfkill] > [] rfkill_switch_all+0x38/0x49 [rfkill] > [] rfkill_op_handler+0x105/0x136 [rfkill] > [] process_one_work+0x248/0x403 > [] ? process_one_work+0x178/0x403 > [] worker_thread+0x139/0x214 > [] ? worker_thread+0x0/0x214 > [] kthread+0x8c/0x94 > [] kernel_thread_helper+0x4/0x10 > [] ? restore_args+0x0/0x30 > [] ? kthread+0x0/0x94 > [] ? kernel_thread_helper+0x0/0x10 > wlan0: deauthenticating from 00:1b:2f:0e:ed:ba by local choice (reason=3) > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/