summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDuoming Zhou <duoming@zju.edu.cn>2024-03-01 11:44:37 +0300
committerStephen Boyd <sboyd@kernel.org>2024-03-09 04:15:20 +0300
commit7938e9ce39d6779d2f85d822cc930f73420e54a6 (patch)
tree80f7a3ad4acb25ccce65ad8f7810c66e51d011bc /Documentation
parentc1ab111e62496d8c1232da767c2bc5cdc76596e5 (diff)
downloadlinux-7938e9ce39d6779d2f85d822cc930f73420e54a6.tar.xz
clk: zynq: Prevent null pointer dereference caused by kmalloc failure
The kmalloc() in zynq_clk_setup() will return null if the physical memory has run out. As a result, if we use snprintf() to write data to the null address, the null pointer dereference bug will happen. This patch uses a stack variable to replace the kmalloc(). Fixes: 0ee52b157b8e ("clk: zynq: Add clock controller driver") Suggested-by: Michal Simek <michal.simek@amd.com> Suggested-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20240301084437.16084-1-duoming@zju.edu.cn Acked-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions