[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175880830233.2803386.1327911402611756316@DEV-409>
Date: Thu, 25 Sep 2025 15:51:42 +0200
From: Chris Wilson <chris.p.wilson@...ux.intel.com>
To: Alexandr Sapozhnkiov <alsp705@...il.com>, Andi Shyti <andi.shyti@...nel.org>
Cc: Jani Nikula <jani.nikula@...ux.intel.com>, Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>, Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko Ursulin <tursulin@...ulin.net>, intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, linux-media@...r.kernel.org, lvc-project@...uxtesting.org, Krzysztof Karas <krzysztof.karas@...el.com>
Subject: Re: [PATCH] gpu: i915: fix error return in mmap_offset_attach()
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
Powered by blists - more mailing lists