Skip to content
Snippets Groups Projects
Commit 40c575d1 authored by Johannes Berg's avatar Johannes Berg
Browse files

cfg80211: fix netdev registration deadlock


If register_netdevice() fails after having called cfg80211's
netdev notifier (cfg80211_netdev_notifier_call) it will call
the notifier again with UNREGISTER. This would then lock the
wiphy mutex because we're marked as registered, which causes
a deadlock.

Fix this by separately keeping track of whether or not we're
in the middle of registering to also skip the notifier call
on this unregister.

Reported-by: default avatar <syzbot+2ae0ca9d7737ad1a62b7@syzkaller.appspotmail.com>
Fixes: a05829a7 ("cfg80211: avoid holding the RTNL when calling the driver")
Link: https://lore.kernel.org/r/20210201192048.ed8bad436737.I7cae042c44b15f80919a285799a15df467e9d42d@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 776a39b8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment