Commit 9c23938e authored by Johannes Berg's avatar Johannes Berg Committed by Kelsey Skunberg

mac80211: fix misplaced while instead of if

BugLink: https://bugs.launchpad.net/bugs/1892822

commit 5981fe5b upstream.

This never was intended to be a 'while' loop, it should've
just been an 'if' instead of 'while'. Fix this.

I noticed this while applying another patch from Ben that
intended to fix a busy loop at this spot.

Cc: stable@vger.kernel.org
Fixes: b16798f5 ("mac80211: mark station unauthorized before key removal")
Reported-by: default avatarBen Greear <greearb@candelatech.com>
Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent dac8dea4
...@@ -906,7 +906,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta) ...@@ -906,7 +906,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
might_sleep(); might_sleep();
lockdep_assert_held(&local->sta_mtx); lockdep_assert_held(&local->sta_mtx);
while (sta->sta_state == IEEE80211_STA_AUTHORIZED) { if (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC); ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
WARN_ON_ONCE(ret); WARN_ON_ONCE(ret);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment