From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.candelatech.com ([208.74.158.172]:48434 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965099Ab2ERWpl (ORCPT ); Fri, 18 May 2012 18:45:41 -0400 Received: from [192.168.100.111] (firewall.candelatech.com [70.89.124.249]) (authenticated bits=0) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id q4IMjeHC022449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 18 May 2012 15:45:40 -0700 Message-ID: <4FB6D114.4050802@candelatech.com> (sfid-20120519_004545_759985_A66CEFC4) Date: Fri, 18 May 2012 15:45:40 -0700 From: Ben Greear MIME-Version: 1.0 To: "linux-wireless@vger.kernel.org" Subject: lockdep splat related to wifi regulatory in 3.3.6+ Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: This appears to be this bug: https://bugzilla.redhat.com/show_bug.cgi?id=734519 Test case was to create 40 (virtual) stations against an AP that can only handle 30, so the remaining 10 constantly try to re-associate, get DHCP if they manage, etc.... cfg80211: Calling CRDA for country: US ====================================================== [ INFO: possible circular locking dependency detected ] 3.3.6+ #1 Tainted: G WC O ------------------------------------------------------- kworker/1:2/62 is trying to acquire lock: (cfg80211_mutex){+.+.+.}, at: [] restore_regulatory_settings+0x2c/0x4af [cfg80211] but task is already holding lock: ((reg_timeout).work){+.+...}, at: [] process_one_work+0x1c2/0x35a which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ((reg_timeout).work){+.+...}: [] lock_acquire+0x64/0x81 [] wait_on_work+0x54/0xd3 [] __cancel_work_timer+0xdf/0x128 [] cancel_delayed_work_sync+0xd/0xf [] reg_set_request_processed+0x4c/0x66 [cfg80211] [] set_regdom+0x5f8/0x69f [cfg80211] [] nl80211_set_reg+0x213/0x26c [cfg80211] [] genl_rcv_msg+0x1f4/0x239 [] netlink_rcv_skb+0x3e/0x8f [] genl_rcv+0x21/0x28 [] netlink_unicast+0xe9/0x152 [] netlink_sendmsg+0x1f8/0x216 [] __sock_sendmsg_nosec+0x5f/0x6a [] __sock_sendmsg+0x3d/0x48 [] sock_sendmsg+0xa3/0xbc [] __sys_sendmsg+0x20f/0x29c [] sys_sendmsg+0x3d/0x5b [] system_call_fastpath+0x16/0x1b -> #1 (reg_mutex){+.+.+.}: [] lock_acquire+0x64/0x81 [] __mutex_lock_common+0x64/0x4b5 [] mutex_lock_nested+0x36/0x3b [] reg_todo+0x2d/0x4d7 [cfg80211] [] process_one_work+0x223/0x35a [] worker_thread+0x136/0x255 [] kthread+0x84/0x8c [] kernel_thread_helper+0x4/0x10 -> #0 (cfg80211_mutex){+.+.+.}: [] __lock_acquire+0xade/0xdce [] lock_acquire+0x64/0x81 [] __mutex_lock_common+0x64/0x4b5 [] mutex_lock_nested+0x36/0x3b [] restore_regulatory_settings+0x2c/0x4af [cfg80211] [] reg_timeout_work+0x1c/0x1e [cfg80211] [] process_one_work+0x223/0x35a [] worker_thread+0x136/0x255 [] kthread+0x84/0x8c [] kernel_thread_helper+0x4/0x10 other info that might help us debug this: Chain exists of: cfg80211_mutex --> reg_mutex --> (reg_timeout).work Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((reg_timeout).work); lock(reg_mutex); lock((reg_timeout).work); lock(cfg80211_mutex); *** DEADLOCK *** 2 locks held by kworker/1:2/62: #0: (events){.+.+.+}, at: [] process_one_work+0x1c2/0x35a #1: ((reg_timeout).work){+.+...}, at: [] process_one_work+0x1c2/0x35a stack backtrace: Pid: 62, comm: kworker/1:2 Tainted: G WC O 3.3.6+ #1 Call Trace: [] print_circular_bug+0x1ff/0x210 [] __lock_acquire+0xade/0xdce [] ? get_parent_ip+0x11/0x42 [] lock_acquire+0x64/0x81 [] ? restore_regulatory_settings+0x2c/0x4af [cfg80211] [] ? add_preempt_count+0xad/0xb1 [] __mutex_lock_common+0x64/0x4b5 [] ? restore_regulatory_settings+0x2c/0x4af [cfg80211] [] ? trace_hardirqs_on+0xd/0xf [] ? restore_regulatory_settings+0x2c/0x4af [cfg80211] [] mutex_lock_nested+0x36/0x3b [] restore_regulatory_settings+0x2c/0x4af [cfg80211] [] reg_timeout_work+0x1c/0x1e [cfg80211] [] process_one_work+0x223/0x35a [] ? process_one_work+0x1c2/0x35a [] ? restore_regulatory_settings+0x4af/0x4af [cfg80211] [] worker_thread+0x136/0x255 [] ? manage_workers+0x191/0x191 [] kthread+0x84/0x8c [] kernel_thread_helper+0x4/0x10 [] ? retint_restore_args+0x13/0x13 [] ? __init_kthread_worker+0x56/0x56 [] ? gs_change+0x13/0x13 cfg80211: Restoring regulatory settings including user preference Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com