From owner-freebsd-wireless@FreeBSD.ORG Fri Oct 14 16:15:05 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08E97106577D; Fri, 14 Oct 2011 16:15:05 +0000 (UTC) (envelope-from emartinez@kbcnetworks.com) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe001.messaging.microsoft.com [216.32.181.181]) by mx1.freebsd.org (Postfix) with ESMTP id AC2428FC13; Fri, 14 Oct 2011 16:15:04 +0000 (UTC) Received: from mail174-ch1-R.bigfish.com (10.43.68.247) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.22; Fri, 14 Oct 2011 16:15:03 +0000 Received: from mail174-ch1 (localhost.localdomain [127.0.0.1]) by mail174-ch1-R.bigfish.com (Postfix) with ESMTP id C4BE717884E9; Fri, 14 Oct 2011 16:15:03 +0000 (UTC) X-SpamScore: -16 X-BigFish: VPS-16(zz9371K1447M542M98dKzz1202hzz8275bh8275dhz2fh2a8h668h839h) X-Forefront-Antispam-Report: CIP:65.55.171.153; KIP:(null); UIP:(null); IPVD:NLI; H:VA3DIAHUB011.RED001.local; RD:smtp801.microsoftonline.com; EFVD:NLI X-FB-SS: 13, Received-SPF: pass (mail174-ch1: domain of kbcnetworks.com designates 65.55.171.153 as permitted sender) client-ip=65.55.171.153; envelope-from=emartinez@kbcnetworks.com; helo=VA3DIAHUB011.RED001.local ; RED001.local ; Received: from mail174-ch1 (localhost.localdomain [127.0.0.1]) by mail174-ch1 (MessageSwitch) id 1318608851966037_21862; Fri, 14 Oct 2011 16:14:11 +0000 (UTC) Received: from CH1EHSMHS021.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.251]) by mail174-ch1.bigfish.com (Postfix) with ESMTP id 18FC24B80AE; Fri, 14 Oct 2011 16:14:10 +0000 (UTC) Received: from VA3DIAHUB011.RED001.local (65.55.171.153) by CH1EHSMHS021.bigfish.com (10.43.70.21) with Microsoft SMTP Server (TLS) id 14.1.225.22; Fri, 14 Oct 2011 16:14:08 +0000 Received: from VA3DIAXVS881.RED001.local ([10.8.235.7]) by VA3DIAHUB011.RED001.local ([10.32.16.182]) with mapi; Fri, 14 Oct 2011 09:14:06 -0700 From: Edgar Martinez To: Adrian Chadd Date: Fri, 14 Oct 2011 09:14:07 -0700 Thread-Topic: LOR - COM LOCK Thread-Index: AcyKJ+RuyxRlwaV6SUiImcSL1kZxnAAZEugg Message-ID: <957EB052144AA64AB39F7AB268783201022FB259D2@VA3DIAXVS881.RED001.local> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: kbcnetworks.com Cc: "freebsd-wireless@freebsd.org" Subject: RE: LOR - COM LOCK X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 16:15:05 -0000 I've noticed that I can get the behavior to *usually* repeat if you kick a = station after association. Thanks for the info, I'll see if I can hunt it down. -----Original Message----- From: adrian.chadd@gmail.com [mailto:adrian.chadd@gmail.com] On Behalf Of A= drian Chadd Sent: Thursday, October 13, 2011 9:15 PM To: Edgar Martinez Cc: freebsd-wireless@freebsd.org Subject: Re: LOR - COM LOCK On 11 October 2011 23:49, Edgar Martinez wrote: > lock order reversal: > =A01st 0xc5912778 ath1_scan_lock (ath1_scan_lock) @ /usr/src/sys/net80211= /ieee80211_node.c:2158 > =A02nd 0xc5911014 ath1_com_lock (ath1_com_lock) @ /usr/src/sys/net80211/i= eee80211_node.c:2510 This is a bit odd. I'm seeing the same LOR. >From what I've determined: * hostap_newstate: the comlock is held, then it calls ieee80211_iterate_nodes(), which grabs the scan/node lock. * ioctl -> ieee80211_ioctl -> ieee80211_iterate_nodes() which grabs the scan/node lock, -> ieee80211_node_leave(), which grabs the comlock. I'm not sure what the correct fix should be and I don't have the time at the moment to fix it. But yes, it should be fixed. Adrian