diff options
| author | Linus Walleij <linusw@kernel.org> | 2026-09-27 11:03:28 +0200 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-10-05 17:37:45 +0200 |
| commit | f2baf04a695de4f952513cb00ccf0338c6db2e00 (patch) | |
| tree | 916097bbd88636d70ff98ebf2afd03a545dc9701 /tools/lib/python | |
| parent | 9a3762b470421658214baeb6cce3eed7344bb435 (diff) | |
dmaengine: ste_dma40: Fix memcpy channel parsing
d40_of_probe() validates the memcpy-channels property against
D40_MEMCPY_MAX_CHANS, but reads the property directly into a smaller global
array. A long property can therefore overwrite adjacent data. The mutable
global also lets a later DMA40 instance replace the memcpy channel mapping
used for future allocations on an earlier instance.
Store the mapping in the per-device platform data, validate the property
against that storage, and check the property read result. The property is
required and d40_probe() always populates the platform data, so remove the
obsolete global mapping and fallback.
Fixes: a7dacb68b35a ("dmaengine: ste_dma40: Allow memcpy channels to be configured from DT")
Reported-by: sashiko-bot@kernel.org
Closes: https://lore.kernel.org/dmaengine/20260819225215.5EA2F1F000E9@smtp.kernel.org/
Assisted-by: LLM
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260927-dma40-fixes-v7-15-89f595e8851d@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
