diff options
author | Johannes Berg <johannes.berg@intel.com> | 2020-08-03 11:02:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-21 09:48:18 +0200 |
commit | 737e3834e607f86f74d45dce6eb1ca6f4a711c1a (patch) | |
tree | 9b043b0cb197dcb7fcc300b0387da26db7a03bb1 | |
parent | 4476c8ef04dd52a3bd6f382cd133ad725980f923 (diff) | |
download | linux-stable-737e3834e607f86f74d45dce6eb1ca6f4a711c1a.tar.gz linux-stable-737e3834e607f86f74d45dce6eb1ca6f4a711c1a.tar.bz2 linux-stable-737e3834e607f86f74d45dce6eb1ca6f4a711c1a.zip |
mac80211: fix misplaced while instead of if
commit 5981fe5b0529ba25d95f37d7faa434183ad618c5 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: b16798f5b907 ("mac80211: mark station unauthorized before key removal")
Reported-by: Ben Greear <greearb@candelatech.com>
Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/mac80211/sta_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 77ab9cc1a230..6af5fda6461c 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -952,7 +952,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta) might_sleep(); 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); WARN_ON_ONCE(ret); } |