[PATCH] media: exynos4-is: fix DMA memory double free

Krzysztof Kozlowski krzk at kernel.org
Tue Oct 27 08:32:44 PDT 2026


On 27/10/2026 15:53, Guangshuo Li wrote:
> fimc_is_alloc_cpu_memory() frees the coherent DMA buffer when its
> DMA address does not satisfy the firmware alignment requirement,
> but leaves is->memory.vaddr non-NULL.
> 
> Because firmware loading is asynchronous, this error path may run
> after probe has returned successfully. A later remove can then
> attempt to free the same DMA allocation again.
> 
> Set is->memory.vaddr to NULL after freeing the buffer so the
> existing NULL check in fimc_is_free_cpu_memory() skips the
> already-freed allocation.
> 
> This issue was found by our static analysis tool under development.
> 
> Fixes: db47622c13ae ("media: platform: exynos4-is: remove all references to physical addresses")
> Cc: stable at vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244 at gmail.com>
> ---

More of postings by bot ignoring any feedback.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list