kernel_samsung_a53x/kernel/dma
Joakim Zhang 4ffea2adf2 dma-mapping: clear dev->dma_mem to NULL after freeing it
[ Upstream commit b07bc2347672cc8c7293c64499f1488278c5ca3d ]

Reproduced with below sequence:
dma_declare_coherent_memory()->dma_release_coherent_memory()
->dma_declare_coherent_memory()->"return -EBUSY" error

It will return -EBUSY from the dma_assign_coherent_memory()
in dma_declare_coherent_memory(), the reason is that dev->dma_mem
pointer has not been set to NULL after it's freed.

Fixes: cf65a0f6f6ff ("dma-mapping: move all DMA mapping code to kernel/dma")
Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:37 +01:00
..
coherent.c dma-mapping: clear dev->dma_mem to NULL after freeing it 2024-11-18 12:12:37 +01:00
contiguous.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
direct.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
direct.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dummy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mapping.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ops_helpers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
remap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
swiotlb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00