From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260526111034.4079-1-Ankit.Soni@amd.com> References: <20260526111034.4079-1-Ankit.Soni@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: iommufd: take dma_resv lock before dma_buf_unpin() in release path Author: Ankit Soni 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