Commit ae68efdf authored by Barnabás Czémán's avatar Barnabás Czémán Committed by Greg Kroah-Hartman
Browse files

wifi: wcn36xx: fix channel survey memory allocation size



[ Upstream commit 6200d947 ]

KASAN reported a memory allocation issue in wcn->chan_survey
due to incorrect size calculation.
This commit uses kcalloc to allocate memory for wcn->chan_survey,
ensuring proper initialization and preventing the use of uninitialized
values when there are no frames on the channel.

Fixes: 29696e0a ("wcn36xx: Track SNR and RSSI for each RX frame")
Signed-off-by: default avatarBarnabás Czémán <barnabas.czeman@mainlining.org>
Acked-by: default avatarLoic Poulain <loic.poulain@linaro.org>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://patch.msgid.link/20241104-wcn36xx-memory-allocation-v1-1-5ec901cf37b6@mainlining.org


Signed-off-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 27834ca5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment