From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: janusz.krzysztofik@intel.com, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org,
gaoxiang17@xiaomi.com
Cc: sumit.semwal@linaro.org
Subject: [PATCH] dma-buf: fix order of trace and fput
Date: Wed, 8 Apr 2026 14:24:37 +0200 [thread overview]
Message-ID: <20260408122437.1364-1-christian.koenig@amd.com> (raw)
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");
--
2.43.0
next reply other threads:[~2026-04-08 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 12:24 Christian König [this message]
2026-04-09 12:38 ` [PATCH] dma-buf: fix order of trace and fput Andi Shyti
2026-04-12 2:31 ` Claude review: " Claude Code Review Bot
2026-04-12 2:31 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260408122437.1364-1-christian.koenig@amd.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gaoxiang17@xiaomi.com \
--cc=janusz.krzysztofik@intel.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox