diff options
author | Chen Ridong <chenridong@huawei.com> | 2024-10-29 08:28:45 +0000 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-12-02 22:14:19 +0530 |
commit | c43ec96e8d34399bd9dab2f2dc316b904892133f (patch) | |
tree | c7e650bdcbe27d4f8a15801a949688dce4a3705f /rust/helpers/vmalloc.c | |
parent | 40384c840ea1944d7c5a392e8975ed088ecf0b37 (diff) |
dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset
The at_xdmac_memset_create_desc may return NULL, which will lead to a
null pointer dereference. For example, the len input is error, or the
atchan->free_descs_list is empty and memory is exhausted. Therefore, add
check to avoid this.
Fixes: b206d9a23ac7 ("dmaengine: xdmac: Add memset support")
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Link: https://lore.kernel.org/r/20241029082845.1185380-1-chenridong@huaweicloud.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions