diff options
| author | Kees Cook <[email protected]> | 2024-07-16 21:38:33 +0000 |
|---|---|---|
| committer | Vinod Koul <[email protected]> | 2024-08-05 16:58:48 +0000 |
| commit | b53b831919a0dc4e6631ebe0497ab2a4d8bef014 (patch) | |
| tree | 2679a74d201263b450a81beeb98aa15915409037 /lib/debugobjects.c | |
| parent | dmaengine: ti: omap-dma: Initialize sglen after allocation (diff) | |
| download | kernel-b53b831919a0dc4e6631ebe0497ab2a4d8bef014.tar.gz kernel-b53b831919a0dc4e6631ebe0497ab2a4d8bef014.zip | |
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 <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
