Skip to content

Commit

Permalink
mac80211: fix infinite loop in ieee80211_determine_chantype
Browse files Browse the repository at this point in the history
Commit "3d9646d mac80211: fix channel selection bug" introduced a possible
infinite loop by moving the out target above the chandef_downgrade
while loop.  When we downgrade to NL80211_CHAN_WIDTH_20_NOHT, we jump
back up to re-run the while loop...indefinitely.  Replace goto with
break and carry on.  This may not be sufficient to connect to the AP,
but will at least keep the cpu from livelocking.  Thanks to Derek Atkins
as an extra pair of debugging eyes.

Cc: stable@kernel.org
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Chris Wright authored and Johannes Berg committed Jul 31, 2013
1 parent c319d50 commit b56e4b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) {
ret = IEEE80211_STA_DISABLE_HT |
IEEE80211_STA_DISABLE_VHT;
goto out;
break;
}

ret |= chandef_downgrade(chandef);
Expand Down

0 comments on commit b56e4b8

Please sign in to comment.