From: Johannes Berg Date: Wed, 20 Mar 2013 13:05:52 +0000 (+0100) Subject: cfg80211: fix potential connection work crash X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=217c15777784331336a8eb232af7e2fa180b136a;p=linux-beck.git 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 --- diff --git a/net/wireless/sme.c b/net/wireless/sme.c index bad4c4b5e4eb..88fc9aa54fe0 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; }