diff options
author | Kees Cook <kees@kernel.org> | 2024-07-16 14:38:33 -0700 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-08-05 22:28:48 +0530 |
commit | b53b831919a0dc4e6631ebe0497ab2a4d8bef014 (patch) | |
tree | 2679a74d201263b450a81beeb98aa15915409037 /lib/interval_tree_test.c | |
parent | 5e5c793c7fc47219998465361d94510fdf55d83f (diff) |
dmaengine: stm32-dma3: Set lli_size after allocation
With the new __counted_by annotation, the "lli_size" variable needs to
valid for accesses to the "lli" array. This requirement is not met in
stm32_dma3_chan_desc_alloc(), since "lli_size" starts at "0", so "lli"
index "0" will not be considered valid during the initialization for loop.
Fix this by setting lli_size immediately after allocation (similar to
how this is handled in stm32_mdma_alloc_desc() for the node/count
relationship).
Fixes: f561ec8b2b33 ("dmaengine: Add STM32 DMA3 support")
Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240716213830.work.951-kees@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'lib/interval_tree_test.c')
0 files changed, 0 insertions, 0 deletions