From owner-freebsd-wireless@FreeBSD.ORG Fri Sep 28 14:03:55 2012 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 26C7C106564A for ; Fri, 28 Sep 2012 14:03:55 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) by mx1.freebsd.org (Postfix) with SMTP id BB3418FC17 for ; Fri, 28 Sep 2012 14:03:54 +0000 (UTC) Received: from [98.139.212.148] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 28 Sep 2012 14:03:48 -0000 Received: from [98.139.213.8] by tm5.bullet.mail.bf1.yahoo.com with NNFMP; 28 Sep 2012 14:03:47 -0000 Received: from [127.0.0.1] by smtp108.mail.bf1.yahoo.com with NNFMP; 28 Sep 2012 14:03:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1348841027; bh=k8mvg1BjetnLqz51g4MMe6SpLzlShNHb5/V9UlSs240=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type; b=YYOTLMKdNt7gOECWUc/Y2jdpXFKovUensEe/8KIb0Xx+RfrtxgiUWJoyaY8uWKILP63voS6sPh3VMVZU+f987WkRwptYKh6D84pBqlf2MbVssnHH/LiCdd2Srl9KVi+AlT6RnPw5Z1G11Vsm55duWNJcia9EDvRUOXvxASkeYZA= X-Yahoo-Newman-Id: 969498.37118.bm@smtp108.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: BILcrH4VM1mxOKzBcAsWjILq2L9d32etftPv.vUH.s1PUYW fRnQ52G4n0s2ypCMrkHl21fI9aRSWHd4PvP1NmZvwqt.9L6oVBxCY2Fh0O7d proztpEm49WNJRg4HPN.09SzI1QnS_LXq4lrLZFKfjZgLsWJ8SkwH06F.WkL MJjZ4VURA9sbembpGtiJBFCIZwOwBtlDP6h5HUHKMVRkcIIcbGdRUbrpWUAD coJ6vbVZJKWyy7EjyrsGW9xMup.QbUgXxBul8CJjUZR1uf1UARPwYbPRZchg T5apcxNe.jQBLpPApTcrngMLGiESG8QlfmZZeM2zNhqQwyH9_eBEhuVOIB2U g1rA7Hx30YBhC2z7N2.Lf_RNvOtpAp4b8m6X3MHF5bKwBMiAAdwy4PxnsxfA 9XsJv4iied76SVuzR66QX1INb3TQgVVgn39djEYNawl7wVS_Jt.IDAtTOd5. iTQcu.iHMMXIdj.EsdbPA2gBpFh47VKNhITnfZuKKhb_61.3KlqZgNwMOJzH dhHHxOkYTlUb9ZUE_juUONsUc5KzwUsSIG7bfThEDDX87pCzQWAkVt0dKJnx 85Fqthg-- X-Yahoo-SMTP: Xr6qjFWswBAEmd20sAvB4Q3keqXvXsIH9TjJ Received: from mail-vb0-f54.google.com (moonlightakkiy@209.85.212.54 with plain) by smtp108.mail.bf1.yahoo.com with SMTP; 28 Sep 2012 07:03:47 -0700 PDT Received: by vbmv11 with SMTP id v11so4088554vbm.13 for ; Fri, 28 Sep 2012 07:03:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.16.12 with SMTP id m12mr4083445vca.14.1348841027369; Fri, 28 Sep 2012 07:03:47 -0700 (PDT) Received: by 10.58.182.72 with HTTP; Fri, 28 Sep 2012 07:03:47 -0700 (PDT) Date: Fri, 28 Sep 2012 08:03:47 -0600 Message-ID: From: PseudoCylon To: Adrian Chadd , Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: ath0_node_lock ath0_com_lock lor 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, 28 Sep 2012 14:03:55 -0000 > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 27 Sep 2012 12:44:04 -0700 > From: Adrian Chadd > Subject: Re: ath0_node_lock ath0_com_lock lor > To: Kim Culhan > Cc: freebsd-wireless@freebsd.org > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Hm, that's odd. Who wants to go digging to figure out which code paths > are causing this? :) > A suggestion in setmlme_dropsta() http://fxr.watson.org/fxr/source/net80211/ieee80211_ioctl.c#L1331 Just forget about node lock and call ieee80211_find_node() instead of ieee80211_find_node_locked(). (I believe this lor occurs only in AP mode.) AK PS This lor is already documented in wifi debug wiki. > > > On 26 September 2012 12:49, Kim Culhan wrote: >> Have not seen an lor in some time, this noted today fyi >> >> lock order reversal: >> 1st 0xffffff80009267f0 ath0_node_lock (ath0_node_lock) @ >> /usr/src/sys/net80211/ieee80211_ioctl.c:1341 >> 2nd 0xffffff8000925018 ath0_com_lock (ath0_com_lock) @ >> /usr/src/sys/net80211/ieee80211_node.c:2619 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b >> kdb_backtrace() at kdb_backtrace+0x39 >> witness_checkorder() at witness_checkorder+0xc37 >> _mtx_lock_flags() at _mtx_lock_flags+0x83 >> ieee80211_node_leave() at ieee80211_node_leave+0x97 >> setmlme_common() at setmlme_common+0x3f7 >> ieee80211_ioctl_setmlme() at ieee80211_ioctl_setmlme+0x87 >> ieee80211_ioctl_set80211() at ieee80211_ioctl_set80211+0x5a5 >> in_control() at in_control+0x216 >> ifioctl() at ifioctl+0x1020 >> kern_ioctl() at kern_ioctl+0x1b0 >> sys_ioctl() at sys_ioctl+0x11f >> amd64_syscall() at amd64_syscall+0x25a >> Xfast_syscall() at Xfast_syscall+0xfb >> --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x801203b8a, rsp = >> 0x7fffffffd9b8, rbp = 0x7fffffffda20 --- >> >> >> -- >> thanks >> -kim