From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: iommufd: take dma_resv lock before dma_buf_unpin() in release path
Date: Wed, 27 May 2026 14:56:38 +1000 [thread overview]
Message-ID: <review-overall-20260526111034.4079-1-Ankit.Soni@amd.com> (raw)
In-Reply-To: <20260526111034.4079-1-Ankit.Soni@amd.com>
Overall Series Review
Subject: iommufd: take dma_resv lock before dma_buf_unpin() in release path
Author: Ankit Soni <Ankit.Soni@amd.com>
Patches: 3
Reviewed: 2026-05-27T14:56:38.808531
---
This is a single-patch bug fix for a real locking deficiency in iommufd's dmabuf teardown path. The analysis is correct: `dma_buf_unpin()` requires the caller to hold `dma_resv_lock`, and `iopt_release_pages()` was calling it without that lock, triggering a `WARN` via `dma_resv_assert_held()`. The fix is minimal and mirrors the existing lock/unlock pattern used in `iopt_map_dmabuf()` (the pin path). The commit message is well-written with a clear stack trace, explanation of the problem, and rationale for lock placement.
**Verdict: Correct fix, ready to merge with minor observations below.**
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-27 4:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 11:10 [PATCH] iommufd: take dma_resv lock before dma_buf_unpin() in release path Ankit Soni
2026-05-26 12:26 ` Jason Gunthorpe
2026-05-26 15:34 ` Ankit Soni
2026-05-27 4:56 ` Claude Code Review Bot [this message]
2026-05-27 4:56 ` Claude review: " 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=review-overall-20260526111034.4079-1-Ankit.Soni@amd.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/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