Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3b0df34 authored by Luca Coelho's avatar Luca Coelho Committed by Greg Kroah-Hartman
Browse files

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: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bc705996
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3995,6 +3995,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);