cfg80211: fix deadlock
When removing an interface with nl80211, cfg80211 will deadlock in the netdev notifier because we're already holding rdev->mtx and try to acquire it again to verify the scan has been done. This bug was introduced by my patch "cfg80211: check for and abort dangling scan requests". To fix this, move the dangling scan request check into wiphy_unregister(). This will not be able to catch all cases right away, but if the scan problem happens with a manual ifdown or so it will be possible to remedy it by removing the module/device. Additionally, add comments about the deadlock scenario. Reported-by: NChristian Lamparter <chunkeey@web.de> Signed-off-by: NJohannes Berg <johannes@sipsolutions.net> Tested-by: NChristian Lamparter <chunkeey@web.de> Tested-by: NKalle Valo <kalle.valo@iki.fi> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Showing
想要评论请 注册 或 登录