Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2012 08:03:47 -0600
From:      PseudoCylon <moonlightakkiy@yahoo.ca>
To:        Adrian Chadd <adrian@freebsd.org>, Kim Culhan <w8hdkim@gmail.com>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: ath0_node_lock ath0_com_lock lor
Message-ID:  <CAFZ_MYKEJnkMW=ZohxGMq2TmqYohJTY%2BO5goHzVJu0P1CZpucQ@mail.gmail.com>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFZ_MYKEJnkMW=ZohxGMq2TmqYohJTY%2BO5goHzVJu0P1CZpucQ>