From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: vfio/pci: Provide a user-facing name for BAR mappings Date: Thu, 28 May 2026 12:28:53 +1000 Message-ID: In-Reply-To: <20260527102319.100128-6-mattev@meta.com> References: <20260527102319.100128-1-mattev@meta.com> <20260527102319.100128-6-mattev@meta.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Nice quality-of-life patch for debugging. Generates names like `vfio1234567890:ffff:ff:3f.7/5`. **Direct access to `priv->dmabuf->name_lock`**: ```c + spin_lock(&priv->dmabuf->name_lock); + kfree(priv->dmabuf->name); + priv->dmabuf->name = bufname; + spin_unlock(&priv->dmabuf->name_lock); ``` This directly reaches into `struct dma_buf` internals rather than using the `DMA_BUF_SET_NAME` path. While functionally fine (and avoids an unnecessary `copy_from_user`), it's fragile if the dma-buf subsystem changes its internal locking. Consider using `dma_buf_set_name()` if one exists, or at minimum add a comment explaining why direct access is used. **`#include `**: Kernel code should include `` rather than the UAPI header. The UAPI header is pulled for `DMA_BUF_NAME_LEN`, which should be available through the normal header. --- Generated by Claude Code Patch Reviewer