Re: [PATCH] mac80211: fix race in ieee80211_register_hw()

From: Johannes Berg
Date: Mon Apr 06 2020 - 11:06:38 EST


On Mon, 2020-04-06 at 19:55 +0530, Krishna Chaitanya wrote:

> > iw phy0 interface add wlan0 type station
> > ip link set wlan0 up
> Ah okay, got it, thanks. Very narrow window though :-) as the
> alloc_ordered_workqueue
> doesn't need RTNL and there is a long way to go to do if_add() from
> user and setup
> the driver for interrupts.

True, I do wonder how this is hit. Maybe something with no preempt and a
uevent triggering things?

> Again depends on the driver though, it
> should properly handle
> pending ieee80211_register_hw() with start().

It could, but it'd be really tricky. Much better to fix mac80211.

johannes