Re: [PATCH] iommufd: take dma_resv lock before dma_buf_unpin() in release path

From: Jason Gunthorpe

Date: Mon Jun 08 2026 - 20:18:53 EST


On Tue, May 26, 2026 at 11:10:34AM +0000, Ankit Soni wrote:

> Take the dma_resv lock around dma_buf_unpin() in iopt_release_pages(),
> matching the iopt_map_dmabuf() convention. dma_buf_detach() acquires the
> reservation lock internally, so it must remain outside the locked region.
>
> Fixes: 8c5f9645c389 ("iommufd: Add dma_buf_pin()")
> Reported-by: Ankit Soni <Ankit.Soni@xxxxxxx>
> Signed-off-by: Ankit Soni <Ankit.Soni@xxxxxxx>
> ---
> drivers/iommu/iommufd/pages.c | 2 ++
> 1 file changed, 2 insertions(+)

Applied to for-next

Thanks,
Jason