瀏覽代碼

cfg80211: free sme on connection failures

cfg80211 is notified about connection failures by
__cfg80211_connect_result() call. However, this
function currently does not free cfg80211 sme.

This results in hanging connection attempts in some cases

e.g. when mac80211 authentication attempt is denied,
we have this function call:
ieee80211_rx_mgmt_auth() -> cfg80211_rx_mlme_mgmt() ->
cfg80211_process_auth() -> cfg80211_sme_rx_auth() ->
__cfg80211_connect_result()

but cfg80211_sme_free() is never get called.

Fixes: ceca7b712 ("cfg80211: separate internal SME implementation")
Cc: stable@vger.kernel.org (3.10+)
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Eliad Peller 11 年之前
父節點
當前提交
c1fbb25884
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/wireless/sme.c

+ 1 - 1
net/wireless/sme.c

@@ -234,7 +234,6 @@ void cfg80211_conn_work(struct work_struct *work)
 					NULL, 0, NULL, 0,
 					NULL, 0, NULL, 0,
 					WLAN_STATUS_UNSPECIFIED_FAILURE,
 					WLAN_STATUS_UNSPECIFIED_FAILURE,
 					false, NULL);
 					false, NULL);
-			cfg80211_sme_free(wdev);
 		}
 		}
 		wdev_unlock(wdev);
 		wdev_unlock(wdev);
 	}
 	}
@@ -648,6 +647,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
 			cfg80211_unhold_bss(bss_from_pub(bss));
 			cfg80211_unhold_bss(bss_from_pub(bss));
 			cfg80211_put_bss(wdev->wiphy, bss);
 			cfg80211_put_bss(wdev->wiphy, bss);
 		}
 		}
+		cfg80211_sme_free(wdev);
 		return;
 		return;
 	}
 	}