mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
wifi: cfg80211: don't get the radio mask for netdev-less wdevs
cfg80211_calculate_bi_data() calls rdev_get_radio_mask() with
wdev->netdev, which can be NULL and then crashes in mac80211.
To avoid that, invert the order of checks since wdev->netdev
is always valid for beaconing interfaces.
Assisted-by: LLM
Fixes: abb4cfe366 ("wifi: cfg80211: extend interface combination check for multi-radio")
Reported-by: syzbot+abff43d2d045e37c0bb2@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=abff43d2d045e37c0bb2
Link: https://patch.msgid.link/20260904165614.2056a8b7dc91.I7412c5062d8166ad6c81ee7252cec49dea19a60f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
ad7265b299
commit
a7783e5853
|
|
@ -2477,16 +2477,15 @@ static void cfg80211_calculate_bi_data(struct wiphy *wiphy, u32 new_beacon_int,
|
|||
if (wdev->valid_links)
|
||||
continue;
|
||||
|
||||
wdev_bi = cfg80211_wdev_bi(wdev);
|
||||
if (!wdev_bi)
|
||||
continue;
|
||||
|
||||
/* skip wdevs not active on the given wiphy radio */
|
||||
if (radio_idx >= 0 &&
|
||||
!(rdev_get_radio_mask(rdev, wdev->netdev) & BIT(radio_idx)))
|
||||
continue;
|
||||
|
||||
wdev_bi = cfg80211_wdev_bi(wdev);
|
||||
|
||||
if (!wdev_bi)
|
||||
continue;
|
||||
|
||||
if (!*beacon_int_gcd) {
|
||||
*beacon_int_gcd = wdev_bi;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user