Dropping the last reference to the DMA-buf and then accessing the name for tracing can't work correctly.
Only compile tested!
Signed-off-by: Christian König christian.koenig@amd.com Fixed: 281a22631423 ("dma-buf: add some tracepoints to debug.") --- drivers/dma-buf/dma-buf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 11711874a325..3a9d5113b98c 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -845,9 +845,8 @@ void dma_buf_put(struct dma_buf *dmabuf) if (WARN_ON(!dmabuf || !dmabuf->file)) return;
- fput(dmabuf->file); - DMA_BUF_TRACE(trace_dma_buf_put, dmabuf); + fput(dmabuf->file); } EXPORT_SYMBOL_NS_GPL(dma_buf_put, "DMA_BUF");
Hi Christian,
@@ -845,9 +845,8 @@ void dma_buf_put(struct dma_buf *dmabuf) if (WARN_ON(!dmabuf || !dmabuf->file)) return;
- fput(dmabuf->file);
- DMA_BUF_TRACE(trace_dma_buf_put, dmabuf);
- fput(dmabuf->file);
funny, I just found out I sent the exact same patch, just few minutes later :-) [*]
Andi
}
[*] https://lore.kernel.org/all/20260408123916.2604101-2-andi.shyti@kernel.org/
On 4/9/26 14:38, Andi Shyti wrote:
Hi Christian,
@@ -845,9 +845,8 @@ void dma_buf_put(struct dma_buf *dmabuf) if (WARN_ON(!dmabuf || !dmabuf->file)) return;
- fput(dmabuf->file);
- DMA_BUF_TRACE(trace_dma_buf_put, dmabuf);
- fput(dmabuf->file);
funny, I just found out I sent the exact same patch, just few minutes later :-) [*]
I liked your patch better since it has more accurate tags.
Just reviewed and pushed that one to drm-misc-fixes, should land upstream by the end of the week.
Regards, Christian.
Andi
}
[*] https://lore.kernel.org/all/20260408123916.2604101-2-andi.shyti@kernel.org/
linaro-mm-sig@lists.linaro.org