]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cfg80211: fix deadlocks in autodisconnect work
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Wed, 8 Jan 2020 11:55:36 +0000 (12:55 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 15 Jan 2020 08:52:49 +0000 (09:52 +0100)
Use methods which do not try to acquire the wdev lock themselves.

Cc: stable@vger.kernel.org
Fixes: f391b5092f15b ("cfg80211: Support all iftypes in autodisconnect_wk")
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200108115536.2262-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/sme.c

index 7a6c38ddc65adbaf60855749a22f120a86f05a2b..d32a2ec4d96ace3b26b53bc8e895ab305961ae4b 100644 (file)
@@ -1307,14 +1307,14 @@ void cfg80211_autodisconnect_wk(struct work_struct *work)
        if (wdev->conn_owner_nlportid) {
                switch (wdev->iftype) {
                case NL80211_IFTYPE_ADHOC:
-                       cfg80211_leave_ibss(rdev, wdev->netdev, false);
+                       __cfg80211_leave_ibss(rdev, wdev->netdev, false);
                        break;
                case NL80211_IFTYPE_AP:
                case NL80211_IFTYPE_P2P_GO:
-                       cfg80211_stop_ap(rdev, wdev->netdev, false);
+                       __cfg80211_stop_ap(rdev, wdev->netdev, false);
                        break;
                case NL80211_IFTYPE_MESH_POINT:
-                       cfg80211_leave_mesh(rdev, wdev->netdev);
+                       __cfg80211_leave_mesh(rdev, wdev->netdev);
                        break;
                case NL80211_IFTYPE_STATION:
                case NL80211_IFTYPE_P2P_CLIENT: