[lvc-project] [PATCH] gpu: i915: fix error return in mmap_offset_attach()
Chris Wilson
chris.p.wilson at linux.intel.com
Thu Sep 25 16:51:42 MSK 2025
Quoting Andi Shyti (2025-09-24 22:20:33)
> > mmo = insert_mmo(obj, mmo);
> > GEM_BUG_ON(lookup_mmo(obj, mmap_type) != mmo);
> > out:
> > - if (file)
> > - drm_vma_node_allow_once(&mmo->vma_node, file);
> > + if (file) {
> > + err = drm_vma_node_allow_once(&mmo->vma_node, file);
> > + if (err)
> > + goto err;
You cannot jump to err here, as that will try to free(mmo) which either
was not allocated by the caller, or ownership has already been
transferred to the mmo tree. It is sufficient to just return the err.
-Chris
More information about the lvc-project
mailing list