mirror of
https://github.com/torvalds/linux.git
synced 2026-09-29 12:24:02 +02:00
wifi: mac80211: don't allow link changes when iface is down
ieee80211_set_active_links() only checks that the interface is running in
the inner __ieee80211_set_active_links(), after drv_can_activate_links()
was already called, so using active_links on an interface that's down
triggers the check-sdata-in-driver warning.
Add the missing check in the debugfs file.
Assisted-by: LLM
Fixes: 3d90110292 ("wifi: mac80211: implement link switching")
Reported-by: syzbot+582469b3a9ef5f13606b@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=582469b3a9ef5f13606b
Link: https://patch.msgid.link/20260908122838.201719-16-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
038e1d1263
commit
370872d303
|
|
@ -729,6 +729,9 @@ static ssize_t ieee80211_if_parse_active_links(struct ieee80211_sub_if_data *sda
|
|||
if (kstrtou16(buf, 0, &active_links) || !active_links)
|
||||
return -EINVAL;
|
||||
|
||||
if (!ieee80211_sdata_running(sdata))
|
||||
return -ENETDOWN;
|
||||
|
||||
return ieee80211_set_active_links(&sdata->vif, active_links) ?: buflen;
|
||||
}
|
||||
IEEE80211_IF_FILE_RW(active_links);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user