From: Johannes Berg Date: Wed, 20 Mar 2013 13:05:52 +0000 (+0100) Subject: cfg80211: fix potential connection work crash X-Git-Tag: v3.10-rc2~34^2~21^2^2~117^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=217c15777784331336a8eb232af7e2fa180b136a;p=platform%2Fkernel%2Flinux-stable.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 bad4c4b..88fc9aa 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; }