summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2017-05-02 17:56:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-13 19:50:01 +0200
commit41a00b47fa91fd4953dfbcbfbd877157a446fd2c (patch)
treecd8cd68455270d7527edc57e920fe54988c7ff91 /net
parentf477b9157b6f703ae802ada7f5a3438a80b68976 (diff)
mac80211: bail out from prep_connection() if a reconfig is ongoing
[ Upstream commit f8860ce836f2d502b07ef99559707fe55d90f5bc ] If ieee80211_hw_restart() is called during authentication, the authentication process will continue, causing the driver to be called in a wrong state. This ultimately causes an oops in the iwlwifi driver (at least). This fixes bugzilla 195299 partly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195299 Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 23095d5e0199..005cd8796505 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4326,6 +4326,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
if (WARN_ON(!ifmgd->auth_data && !ifmgd->assoc_data))
return -EINVAL;
+ /* If a reconfig is happening, bail out */
+ if (local->in_reconfig)
+ return -EBUSY;
+
if (assoc) {
rcu_read_lock();
have_sta = sta_info_get(sdata, cbss->bssid);