aboutsummaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-20 14:05:52 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-03-20 14:07:26 +0100
commit217c15777784331336a8eb232af7e2fa180b136a (patch)
tree8c80902548d536701a9aed24a75d9745fd1d9e16 /net/wireless
parent3eb92f6a3948c4358eb8ad1c0905490ddd2fc0ab (diff)
cfg80211: fix potential connection work crash
If wpa_supplicant and iw/iwconfig are used together, very rarely the system crashes. It seems to be related to the connection parameters not being set up, but it's not all clear to me how this happens. In any case, checking that the conn pointer exists here is probably a good idea. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/sme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index bad4c4b5e4e..88fc9aa54fe 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -234,7 +234,7 @@ void cfg80211_conn_work(struct work_struct *work)
wdev_unlock(wdev);
continue;
}
- if (wdev->sme_state != CFG80211_SME_CONNECTING) {
+ if (wdev->sme_state != CFG80211_SME_CONNECTING || !wdev->conn) {
wdev_unlock(wdev);
continue;
}