OSDN Git Service

cfg80211: call cfg80211_destroy_ifaces() with wiphy lock held
authorJohannes Berg <johannes.berg@intel.com>
Thu, 28 Jan 2021 17:35:28 +0000 (18:35 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 28 Jan 2021 18:11:11 +0000 (19:11 +0100)
commit776a39b8196dbca4afb69669db0d9926ffac29ab
treeb58e12f03b492604c7d4c938b0ee56e9bc807d8c
parentc88f952026ab0b860451bdc88f43d73124a7302a
cfg80211: call cfg80211_destroy_ifaces() with wiphy lock held

This is needed since it calls into the driver, which must have the
same context as if we got to destroy an interface through nl80211.
Fix this, and add a direct lockdep assertion so we don't see it
pop up only when the driver calls back to cfg80211.

Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
Reported-by: syzbot+4305e814f9b267131776@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20210128183454.d31df9cbd7ce.I1beb07c9492f0ade900e864a098c57041e7a7ebf@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c