Skip to content

Commit

Permalink
mac80211: bail out from prep_connection() if a reconfig is ongoing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luca Coelho authored and Johannes Berg committed May 8, 2017
1 parent 2f242bf commit f8860ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -4382,6 +4382,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);
Expand Down

0 comments on commit f8860ce

Please sign in to comment.