Skip to content

Commit

Permalink
mac80211: fix misplaced while instead of if
Browse files Browse the repository at this point in the history
commit 5981fe5 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: [email protected]
Fixes: b16798f ("mac80211: mark station unauthorized before key removal")
Reported-by: Ben Greear <[email protected]>
Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeid
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jmberg-intel authored and gregkh committed Aug 21, 2020
1 parent 4476c8e commit 737e383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 737e383

Please sign in to comment.