From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CECD3F44F7 for ; Fri, 26 Jun 2026 13:12:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782479563; cv=none; b=N9xqMSr2jROkffgGNzucrmJpscpwe48exd7t2daV95NqxuYcZQ8yD25OwNDEinbaodpjUKBYPFanZBwh/y/iKTGKTjn8CuMTGC8fmsZHPSjhpExcHN0ZzkIgQqO2tuM9blsIrXHePywChNkyiJShpkf/C8gMVcUVaRVMd+j6imo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782479563; c=relaxed/simple; bh=/pFqPig/BQYa1aIM5fHtz2O/tRy/uSvCH0TRXumAzI4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g2I2wSExNFDDbhOo+uawXACktbQlMFmgQh9XB7oG4hOvPSVzBZttxCeoeEUjrng/7FVcIYw2gKBxUS8G1AynpUvU8xhYF76qqTwpnTrHdSV5LVgsXl4ck9KVUAsAfU1glh7x9kDfsgsywXkM/bjpXXuRZoyTKk5UCeGUrBohwx8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ANDT4fKC; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ANDT4fKC" 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 E7CA71FCD for ; Fri, 26 Jun 2026 06:12:36 -0700 (PDT) Received: from [192.168.0.1] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 46ADD3F632 for ; Fri, 26 Jun 2026 06:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782479561; bh=/pFqPig/BQYa1aIM5fHtz2O/tRy/uSvCH0TRXumAzI4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ANDT4fKCZ7JAx46hUchKvM79X9vSPjWXzZhFLzsCulqXcBUU60Wscu1hgQzPzwfNe R5iVChVoxsaIHkvdnL3dNKRuMoji58FZGf6D6YiqH3Rg3ecwaG60Q/07ZBlTo9mKAe IkxE85VfRVzleLVp8RVFVaNj4fGXBRTZsY2RbTpM= Date: Fri, 26 Jun 2026 14:12:29 +0100 From: Liviu Dudau To: Boris Brezillon Cc: Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Nicolas Frattaroli , Chia-I Wu , Karunika Choo , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, sashiko-bot@kernel.org Subject: Re: [PATCH 09/11] drm/panthor: Fix a leak when a group is evicted before the tiler OOM is serviced Message-ID: References: <20260625-panthor-misc-fixes-v1-0-b67ed973fea6@collabora.com> <20260625-panthor-misc-fixes-v1-9-b67ed973fea6@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260625-panthor-misc-fixes-v1-9-b67ed973fea6@collabora.com> On Thu, Jun 25, 2026 at 02:40:35PM +0200, Boris Brezillon wrote: > A group ref is tied to the pending tiler_oom_work, so we need to release > it if the cancel was effective. > > Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") > Reported-by: sashiko-bot@kernel.org > Closes: https://sashiko.dev/#/patchset/20260623-panthor-signal-from-irq-v3-0-2ece396f8ee0@collabora.com?part=7 > 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 ab3e13e44a26..5fe95d03f23e 100644 > --- a/drivers/gpu/drm/panthor/panthor_sched.c > +++ b/drivers/gpu/drm/panthor/panthor_sched.c > @@ -1057,7 +1057,8 @@ group_unbind_locked(struct panthor_group *group) > > /* Tiler OOM events will be re-issued next time the group is scheduled. */ > atomic_set(&group->tiler_oom, 0); > - cancel_work(&group->tiler_oom_work); > + if (cancel_work(&group->tiler_oom_work)) > + group_put(group); > > for (u32 i = 0; i < group->queue_count; i++) > group->queues[i]->doorbell_id = -1; > > -- > 2.54.0 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯