Messages in this thread | | | Subject | Re: [PATCH 1/2] cfg80211: fix dead lock for nl80211_new_interface() | From | Johannes Berg <> | Date | Wed, 21 Sep 2022 18:36:18 +0200 |
| |
On Wed, 2022-09-21 at 17:19 +0800, Aran Dalton wrote: > Both nl80211_new_interface and cfg80211_netdev_notifier_call hold the > same wiphy_lock, then cause deadlock. > > The main call stack as bellow: > > nl80211_new_interface() takes wiphy_lock > -> _nl80211_new_interface: > -> rdev_add_virtual_intf > -> rdev->ops->add_virtual_intf > -> register_netdevice
The bug is yours, here, you're no longer allowed to call register_netdevice() here.
If you have an out-of-tree driver that we couldn't update when doing tree-wide changes, you probably shouldn't assume that the bug is upstream and send random locking patches ... :)
johannes
| |