diff options
| author | Haoyu Li <lihaoyu499@gmail.com> | 2024-12-03 23:20:49 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-19 18:13:12 +0100 |
| commit | c2f296183c612077272c57143fcaed40e486fdba (patch) | |
| tree | 77ef56b914ccf50e2a887421da9ccb9841d6540f /tools | |
| parent | a59c61a1869ceefc65ef02886f91e8cd0062211f (diff) | |
| download | linux-c2f296183c612077272c57143fcaed40e486fdba.tar.gz linux-c2f296183c612077272c57143fcaed40e486fdba.tar.bz2 linux-c2f296183c612077272c57143fcaed40e486fdba.zip | |
wifi: cfg80211: sme: init n_channels before channels[] access
[ Upstream commit f1d3334d604cc32db63f6e2b3283011e02294e54 ]
With the __counted_by annocation in cfg80211_scan_request struct,
the "n_channels" struct member must be set before accessing the
"channels" array. Failing to do so will trigger a runtime warning
when enabling CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.
Fixes: e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by")
Signed-off-by: Haoyu Li <lihaoyu499@gmail.com>
Link: https://patch.msgid.link/20241203152049.348806-1-lihaoyu499@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
