summaryrefslogtreecommitdiff
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-02-01 21:20:50 +0300
committerJohannes Berg <johannes.berg@intel.com>2021-02-01 21:30:54 +0300
commit40c575d1ec71f7a61c73ba1603a69650c130559c (patch)
treefd01bc1a23dd89442544f2e9e56dd13269cdb00f /include/net/sch_generic.h
parent776a39b8196dbca4afb69669db0d9926ffac29ab (diff)
downloadlinux-40c575d1ec71f7a61c73ba1603a69650c130559c.tar.xz
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: syzbot+2ae0ca9d7737ad1a62b7@syzkaller.appspotmail.com Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Link: https://lore.kernel.org/r/20210201192048.ed8bad436737.I7cae042c44b15f80919a285799a15df467e9d42d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/sch_generic.h')
0 files changed, 0 insertions, 0 deletions