Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 929F3CCF9F8 for ; Mon, 3 Nov 2025 12:04:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD38210E3C1; Mon, 3 Nov 2025 12:04:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 538F910E3C1 for ; Mon, 3 Nov 2025 12:04:26 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 41FE91D14 for ; Mon, 3 Nov 2025 04:04:18 -0800 (PST) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CDD5C3F694 for ; Mon, 3 Nov 2025 04:04:25 -0800 (PST) Date: Mon, 3 Nov 2025 12:04:21 +0000 From: Liviu Dudau To: Boris Brezillon Cc: Steven Price , =?utf-8?Q?Adri=C3=A1n?= Larumbe , dri-devel@lists.freedesktop.org, kernel@collabora.com Subject: Re: [PATCH v2 2/2] drm/panthor: Fix group_free_queue() for partially initialized queues Message-ID: References: <20251031160318.832427-1-boris.brezillon@collabora.com> <20251031160318.832427-2-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20251031160318.832427-2-boris.brezillon@collabora.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Oct 31, 2025 at 05:03:18PM +0100, Boris Brezillon wrote: > group_free_queue() can be called on a partially initialized queue > object if something fails in group_create_queue(). Make sure we don't > call drm_sched_entity_destroy() on an entity that hasn't been > initialized. > > v2: > - Fix typos > - Add R-b > > Fixes: 7d9c3442b02a ("drm/panthor: Defer scheduler entitiy destruction to queue release") > Reviewed-by: Adrián Larumbe > Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Best regards, Liviu > --- > drivers/gpu/drm/panthor/panthor_sched.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c > index 33e04208db31..e0f5b9171320 100644 > --- a/drivers/gpu/drm/panthor/panthor_sched.c > +++ b/drivers/gpu/drm/panthor/panthor_sched.c > @@ -913,7 +913,8 @@ static void group_free_queue(struct panthor_group *group, struct panthor_queue * > if (IS_ERR_OR_NULL(queue)) > return; > > - drm_sched_entity_destroy(&queue->entity); > + if (queue->entity.fence_context) > + drm_sched_entity_destroy(&queue->entity); > > if (queue->scheduler.ops) > drm_sched_fini(&queue->scheduler); > -- > 2.51.0 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯