summaryrefslogtreecommitdiff
path: root/drivers/interconnect/imx
diff options
context:
space:
mode:
authorDuoming Zhou <duoming@zju.edu.cn>2024-03-06 22:04:37 +0800
committerKalle Valo <kvalo@kernel.org>2024-03-12 17:32:25 +0200
commit316f790ebcf94bdf59f794b7cdea4068dc676d4c (patch)
tree26e017c9ab6dc1ae5eff5af37270cc48b1a9f965 /drivers/interconnect/imx
parent789c17185fb0f39560496c2beab9b57ce1d0cbe7 (diff)
wifi: brcmfmac: pcie: handle randbuf allocation failure
The kzalloc() in brcmf_pcie_download_fw_nvram() will return null if the physical memory has run out. As a result, if we use get_random_bytes() to generate random bytes in the randbuf, the null pointer dereference bug will happen. In order to prevent allocation failure, this patch adds a separate function using buffer on kernel stack to generate random bytes in the randbuf, which could prevent the kernel stack from overflow. Fixes: 91918ce88d9f ("wifi: brcmfmac: pcie: Provide a buffer of random bytes to the device") Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240306140437.18177-1-duoming@zju.edu.cn
Diffstat (limited to 'drivers/interconnect/imx')
0 files changed, 0 insertions, 0 deletions