summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLinmao Li <lilinmao@kylinos.cn>2026-08-13 16:23:15 +0800
committerJeff Chen <jeff.chen_1@nxp.com>2026-10-06 21:13:54 +0800
commit050f03bb0effd773c877cfba3b651c6d380b1c15 (patch)
treeb1538a07acb461b879901bc71a894e5767d12f37 /tools/perf/scripts/python
parentd68d6d8d8bbb5596909479dc6cac58132d8f0dbf (diff)
downloadlinux-050f03bb0effd773c877cfba3b651c6d380b1c15.tar.gz
linux-050f03bb0effd773c877cfba3b651c6d380b1c15.zip
wifi: nxpwifi: zero the channel statistics array
adapter->chan_stats comes from vmalloc(), which does not clear the memory, and nxpwifi_cfg80211_dump_survey() reads it as soon as user space asks for survey data. For the entries no scan has filled in, a non-zero cca_scan_dur passes the validity check and stale bytes are reported to user space as noise, time and time_busy. Use kcalloc() instead. The array holds two entries per supported channel, small enough not to need vmalloc(), and the two callers change to kfree() accordingly. mwifiex fixed the same issue in commit 0e20450829ca ("wifi: mwifiex: Initialize the chan_stats array to zero"). Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x") Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Jeff Chen <jeff.chen_1@nxp.com> Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions