ath0_node_lock ath0_com_lock lor

PseudoCylon moonlightakkiy at yahoo.ca
Fri Sep 28 14:03:55 UTC 2012


> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 27 Sep 2012 12:44:04 -0700
> From: Adrian Chadd <adrian at freebsd.org>
> Subject: Re: ath0_node_lock ath0_com_lock lor
> To: Kim Culhan <w8hdkim at gmail.com>
> Cc: freebsd-wireless at freebsd.org
> Message-ID:
>         <CAJ-Vmo=kVMFJ+RBr0EBo=e9TrP97E+Povvj9hokzKtAqRRCxnQ at mail.gmail.com>
> 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 <w8hdkim at gmail.com> 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


More information about the freebsd-wireless mailing list