Re: [BUG] iommufd: dma-buf-backed iopt_pages wrongly reaches userspace GUP path and triggers lockdep warning

From: Jason Gunthorpe

Date: Wed Jul 08 2026 - 10:49:05 EST


On Wed, Jul 08, 2026 at 06:44:25PM +0800, Peiyang He wrote:

> =============
> Suggested fix
> =============
>
> If above analysis is correct, we should add dma-buf rejection in iopt_area_add_access()
> or/and iommufd_access_pin_pages(), similar to iopt_pages_rw_access().

Yes, this is right, it is definitely a meaningful bug that DMABUF is
not blocked from access. Do you want to send a patch?

Jason