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

From: Peiyang He

Date: Wed Jul 08 2026 - 23:00:40 EST


On 2026/7/8 22:36, Jason Gunthorpe wrote:
> 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?
>
Hi Jason,

Thanks for your reply. Yes, I will send a patch very soon.

Best,
Peiyang