Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-05 Thread Vitaliy Makkoveev
> On 5 Dec 2021, at 20:05, Scott Cheloha wrote: > > Suppose the ic_bgscan_timeout timeout is running at the moment we're > running ieee80211_ifdetach(). Ignore the kernel lock for the moment, > think about the future. > > If we delete the task before we delete the timeout and the timeout >

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-05 Thread Stefan Sperling
On Sun, Dec 05, 2021 at 11:05:32AM -0600, Scott Cheloha wrote: > > diff 0b61c8235787960f0010ef627ea5b2c6309a81f0 > > de98c050ea709bdb8e26be40ab0cc82ef9afed80 > > blob - 7bb68194dd78417b06c59f81d1ebbff4165203d8 > > blob + 5b9a969258074fde29e21a33ac035cf170ec3b03 > > --- sys/net80211/ieee80211.c >

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-05 Thread Scott Cheloha
On Sat, Dec 04, 2021 at 08:40:42PM +0100, Stefan Sperling wrote: > On Sat, Dec 04, 2021 at 09:32:40PM +0300, Vitaliy Makkoveev wrote: > > I think rtm_80211info() could follow the if_link_state_change() > > way and use task for that. > > Indeed. I did not realize that if_link_state_change()

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-05 Thread Florian Obser
reads OK On 2021-12-04 20:40 +01, Stefan Sperling wrote: > On Sat, Dec 04, 2021 at 09:32:40PM +0300, Vitaliy Makkoveev wrote: >> I think rtm_80211info() could follow the if_link_state_change() >> way and use task for that. > > Indeed. I did not realize that if_link_state_change() schedules a

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Vitaliy Makkoveev
> On 4 Dec 2021, at 22:40, Stefan Sperling wrote: > > On Sat, Dec 04, 2021 at 09:32:40PM +0300, Vitaliy Makkoveev wrote: >> I think rtm_80211info() could follow the if_link_state_change() >> way and use task for that. > > Indeed. I did not realize that if_link_state_change() schedules a task. >

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Stefan Sperling
On Sat, Dec 04, 2021 at 09:32:40PM +0300, Vitaliy Makkoveev wrote: > I think rtm_80211info() could follow the if_link_state_change() > way and use task for that. Indeed. I did not realize that if_link_state_change() schedules a task. This means ieee80211_set_link_state() is already deferring

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Stefan Sperling
On Sat, Dec 04, 2021 at 07:19:23PM +0100, Stefan Sperling wrote: > For this particular case, yes. > But that won't solve ieee80211_set_link_state() being called from > interrupt context, would it? Below is a breakdown of all callers by context. I grepped for direct callers. My search did not see

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Vitaliy Makkoveev
> On 4 Dec 2021, at 21:19, Stefan Sperling wrote: > > On Sat, Dec 04, 2021 at 07:06:35PM +0100, Tobias Heider wrote: >> On Sat, Dec 04, 2021 at 06:50:54PM +0100, Stefan Sperling wrote: >>> On Sat, Dec 04, 2021 at 10:37:53AM -0600, Scott Cheloha wrote: Hit a witness panic during boot

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Stefan Sperling
On Sat, Dec 04, 2021 at 07:06:35PM +0100, Tobias Heider wrote: > On Sat, Dec 04, 2021 at 06:50:54PM +0100, Stefan Sperling wrote: > > On Sat, Dec 04, 2021 at 10:37:53AM -0600, Scott Cheloha wrote: > > > Hit a witness panic during boot yesterday. Can't repro, have never > > > seen it before. The

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Tobias Heider
On Sat, Dec 04, 2021 at 06:50:54PM +0100, Stefan Sperling wrote: > On Sat, Dec 04, 2021 at 10:37:53AM -0600, Scott Cheloha wrote: > > Hit a witness panic during boot yesterday. Can't repro, have never > > seen it before. The photo is a mess (ask if you want it) but the > > backtrace is: > > > >

Re: panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Stefan Sperling
On Sat, Dec 04, 2021 at 10:37:53AM -0600, Scott Cheloha wrote: > Hit a witness panic during boot yesterday. Can't repro, have never > seen it before. The photo is a mess (ask if you want it) but the > backtrace is: > > panic > witness_checkorder > rw_enter_write > solock > route input >

panic: ieee80211_set_link_state() calls rtm_80211info() from timeout context

2021-12-04 Thread Scott Cheloha
Hit a witness panic during boot yesterday. Can't repro, have never seen it before. The photo is a mess (ask if you want it) but the backtrace is: panic witness_checkorder rw_enter_write solock route input ieee80211_set_link_state ieee80211_recv_4way_msg3 ieee80211_eapol_key_input