On Mon, Oct 27, 2025 at 02:31:02PM -0300, Jason Gunthorpe wrote:
> @@ -1024,8 +1027,15 @@ static int iopt_fill_domain(struct io_pagetable *iopt,
> continue;
>
> mutex_lock(&pages->mutex);
> + if (iopt_is_dmabuf(pages)) {
> + rc = iopt_dmabuf_track_domain(pages, area, domain);
> + if (rc)
> + goto out_unfill;
I think this error path results in locking pages->mutex recursively. Needs a
mutex_unlock(&pages->mutex)?
> + }
> rc = iopt_area_fill_domain(area, domain);
> if (rc) {
> + if (iopt_is_dmabuf(pages))
> + iopt_dmabuf_untrack_domain(pages, area, domain);
> mutex_unlock(&pages->mutex);
> goto out_unfill;
> }