diff options
| author | Marek Szyprowski <m.szyprowski@samsung.com> | 2026-09-21 09:52:00 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@armlinux.org.uk> | 2026-10-14 17:19:52 +0100 |
| commit | 74f79365839720bdb0c6bb4fe85c5b2a929ff5d1 (patch) | |
| tree | 5df666f8660bf0f6070b3280a84fb2bce1946886 /scripts/decode_stacktrace.sh | |
| parent | 9f878a6c2207f0c12f34a715a6a05cfc95f47460 (diff) | |
ARM: 9519/1: dma-mapping: Fix wrong free function in __iommu_alloc_simple() error path
In __iommu_alloc_simple(), when IOMMU mapping creation fails, the error
path unconditionally called __free_from_pool() regardless of the
allocation path taken.
For the COHERENT case, memory is allocated via __alloc_simple_buffer(),
which does not use the atomic pool. Calling __free_from_pool() on such
memory silently returns without freeing, causing a page memory leak.
Fix this by matching the free function to the allocation path:
- COHERENT: use __dma_free_buffer(virt_to_page(addr), size)
- non-COHERENT: use __free_from_pool(addr, size)
Fixes: 565068221b905 ("ARM: 8561/4: dma-mapping: Fix the coherent case when iommu is used")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'scripts/decode_stacktrace.sh')
0 files changed, 0 insertions, 0 deletions
