mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 10:02:02 +02:00
wifi: mac80211: don't start a ROC while scanning
The ROC work can be pending when a scan starts (which requires
ROC list to be empty, but that's possible), and then a new ROC
can be added to the list and the work will pick it up.
Avoid starting that ROC if a scan made it between things, as
otherwise we'll hit a warning later:
WARNING: net/mac80211/offchannel.c:404 at ieee80211_start_next_roc+0x256/0x2d0
Workqueue: events_unbound cfg80211_wiphy_work
Call Trace:
__ieee80211_scan_completed+0x4fd/0xe40 net/mac80211/scan.c:537
ieee80211_scan_work+0x472/0x1ff0 net/mac80211/scan.c:1193
cfg80211_wiphy_work+0x410/0x570 net/wireless/core.c:513
Assisted-by: LLM
Fixes: aaa016ccd5 ("mac80211: rewrite remain-on-channel logic")
Reported-by: syzbot+c3a167b5615df4ccd7fb@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=c3a167b5615df4ccd7fb
Link: https://patch.msgid.link/20260904165722.f9d5b150edd8.I61bc9de8c8d089096ad695213b9c85c7df38c3bd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
23c68b4aaf
commit
733f0fde95
|
|
@ -460,6 +460,13 @@ static void __ieee80211_roc_work(struct ieee80211_local *local)
|
|||
return;
|
||||
|
||||
if (!roc->started) {
|
||||
/*
|
||||
* The work can be started by a previous ROC work, but a scan
|
||||
* can get between things; scan finish will retrigger us.
|
||||
*/
|
||||
if (local->scanning)
|
||||
return;
|
||||
|
||||
WARN_ON(!local->emulate_chanctx);
|
||||
_ieee80211_start_next_roc(local);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user