summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2026-08-02 10:40:09 +0200
committerJohannes Berg <johannes.berg@intel.com>2026-08-02 18:26:04 +0200
commitaa0069bd920a0bc02d40d84fe39e7ef478c229e8 (patch)
tree12d079b2fd5ac0d878516da88647866e788adf53
parent9d96e037ff90a2fc81a841b2002d500a5a4a5351 (diff)
downloadlinux-next-aa0069bd920a0bc02d40d84fe39e7ef478c229e8.tar.gz
linux-next-aa0069bd920a0bc02d40d84fe39e7ef478c229e8.zip
wifi: mac80211: fix RCU dereference in throughput estimate
This is invoked with the wiphy mutex held, not in an RCU critical section, fix the dereference accordingly. Fixes: 2f925427e27a ("wifi: mac80211: estimate expected throughput if not provided by driver/rc") Link: https://patch.msgid.link/20260802104010.94bf0862c329.I0a05bf8ab999cb737c487d79082425257e10132a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/sta_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index d12aed9c1756..fdf00cbf49d8 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2821,7 +2821,7 @@ static u32 sta_estimate_expected_throughput(struct sta_info *sta,
u32 duration;
u8 band;
- conf = rcu_dereference(bss_conf->chanctx_conf);
+ conf = sdata_dereference(bss_conf->chanctx_conf, sta->sdata);
if (!conf)
return 0;
band = conf->def.chan->band;