summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2026-09-02 00:21:45 -0600
committerVinod Koul <vkoul@kernel.org>2026-10-05 15:44:11 +0200
commitfd39726ab7096840cc9c9dea6dfba23834fc81f0 (patch)
tree7e7014f2e0610a59e0b2268906dba2a938309f5e /tools/lib/python/kdoc/python_version.py
parent1188942d6160b9f799af297bdb5d7812cd7fde6d (diff)
dmaengine: switchtec-dma: fix channel leak on registration failure
switchtec_dma_chans_release() is called in three places but the underlying memory is not freed in all of those places. In order to clean this up, introduce a switchtec_dma_chans_free() helper that will free the memory. Ensure each call to switchtec_dma_chans_release() has a corresponding switchtec_dma_chans_free() call. (The release in switchtec_dma_remove() pairs with the free in switchtec_dma_release()). swdma_dev->chan_cnt is now set to the number of channels that succeeded when one fails to initialise, so switchtec_dma_chans_free() can still be used if not all channels succeed in being allocated. switchtec_dma_chans_free() also removes each channel from dma_dev->channels before freeing it, since the channel status ISR walks that list and would otherwise dereference freed memory. Fixes: 30eba9df76ad ("dmaengine: switchtec-dma: Implement hardware initialization and cleanup") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://lore.kernel.org/dmaengine/20260717223024.9BB8A1F000E9@smtp.kernel.org Link: https://lore.kernel.org/dmaengine/20260727190604.397DB1F000E9@smtp.kernel.org Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Link: https://patch.msgid.link/20260902062153.31048-4-logang@deltatee.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions