linux/kernel/dma
Joakim Zhang 5ef6f81c32 dma-mapping: clear dev->dma_mem to NULL after freeing it
[ Upstream commit b07bc23476 ]

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: cf65a0f6f6 ("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-01-25 14:33:34 -08:00
..
coherent.c dma-mapping: clear dev->dma_mem to NULL after freeing it 2024-01-25 14:33:34 -08:00
contiguous.c dma-mapping: fix panic caused by passing empty cma command line argument 2018-11-13 11:08:17 -08:00
debug.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
direct.c dma-direct: do not include SME mask in the DMA supported check 2019-01-13 09:51:05 +01:00
Kconfig dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration 2018-09-25 15:11:58 -07:00
Makefile
mapping.c
noncoherent.c
swiotlb.c swiotlb: skip swiotlb_bounce when orig_addr is zero 2022-07-02 16:27:40 +02:00
virt.c