diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2017-05-02 10:56:21 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-05-08 05:23:50 -0400 |
commit | f8860ce836f2d502b07ef99559707fe55d90f5bc (patch) | |
tree | c4c86a2e54ba42f8d9286187685c7979891a9e35 /net/mac80211/mlme.c | |
parent | 2f242bf45370b8ea44f209b22c3c90984655a102 (diff) |
mac80211: bail out from prep_connection() if a reconfig is ongoing
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>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 89dff563b1ec..0ea9712bd99e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -4382,6 +4382,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
4382 | if (WARN_ON(!ifmgd->auth_data && !ifmgd->assoc_data)) | 4382 | if (WARN_ON(!ifmgd->auth_data && !ifmgd->assoc_data)) |
4383 | return -EINVAL; | 4383 | return -EINVAL; |
4384 | 4384 | ||
4385 | /* If a reconfig is happening, bail out */ | ||
4386 | if (local->in_reconfig) | ||
4387 | return -EBUSY; | ||
4388 | |||
4385 | if (assoc) { | 4389 | if (assoc) { |
4386 | rcu_read_lock(); | 4390 | rcu_read_lock(); |
4387 | have_sta = sta_info_get(sdata, cbss->bssid); | 4391 | have_sta = sta_info_get(sdata, cbss->bssid); |