Re: [PATCH 09/11] drm/panthor: Fix a leak when a group is evicted before the tiler OOM is serviced
From: Liviu Dudau
Date: Fri Jun 26 2026 - 09:13:50 EST
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@xxxxxxxxxx
> Closes: https://sashiko.dev/#/patchset/20260623-panthor-signal-from-irq-v3-0-2ece396f8ee0@xxxxxxxxxxxxx?part=7
> Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
Reviewed-by: Liviu Dudau <liviu.dudau@xxxxxxx>
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! /
---------------
¯\_(ツ)_/¯