summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org>2026-07-17 23:34:20 +0530
committerMarek Szyprowski <m.szyprowski@samsung.com>2026-07-31 08:40:58 +0200
commit0510cb5b23037dbaaf57b8ddd6af32cbfc173ef2 (patch)
treebac9819a7f6fd4ec3179f1875b2c0fa0ab45c819 /include/linux
parent94a04ad732c9f8b9554270fc4038a06737de5c22 (diff)
dma-pool: fix page leak in atomic_pool_expand() cleanup
atomic_pool_expand() frees the allocated pages from the remove_mapping error path only when CONFIG_DMA_DIRECT_REMAP is enabled. When CONFIG_DMA_DIRECT_REMAP is disabled, failures after page allocation, such as gen_pool_add_virt(), jump to remove_mapping and return without freeing the pages. Move __free_pages(page, order) out of the CONFIG_DMA_DIRECT_REMAP block so that cleanup paths always release the allocation. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Tested-by: Michael Kelley <mhklinux@outlook.com> Tested-by: Mostafa Saleh <smostafa@google.com> Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org> Link: https://lore.kernel.org/r/20260717180442.110954-3-aneesh.kumar@kernel.org Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions