]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cfg80211: fix potential connection work crash
authorJohannes Berg <johannes.berg@intel.com>
Wed, 20 Mar 2013 13:05:52 +0000 (14:05 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 20 Mar 2013 13:07:26 +0000 (14:07 +0100)
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>
net/wireless/sme.c

index bad4c4b5e4eb90f667f5a749b4ab201803d4abe7..88fc9aa54fe0a416ba613864959fb4d362abe503 100644 (file)
@@ -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;
                }