Skip to content

Commit

Permalink
cfg80211: fix potential connection work crash
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Mar 20, 2013
1 parent 3eb92f6 commit 217c157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 217c157

Please sign in to comment.