[PATCH V3] drm/sched: Fix fence reference count leak
From: Qianyi Liu
Date: Mon Mar 10 2025 - 04:57:06 EST
>> The last_scheduled fence leaked when an entity was being killed and
>> adding its callback failed.
>>
>> Decrement the reference count of prev when dma_fence_add_callback()
>> fails, ensuring proper balance.
>>
>> Cc: stable@xxxxxxxxxxxxxxx
>> Fixes: 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini")
>> Signed-off-by: qianyi liu <liuqianyi125@xxxxxxxxx>
>
>> From: qianyi liu <liuqianyi125@xxxxxxxxx>
>>
>> The last_scheduled fence leaked when an entity was being killed and
>> adding its callback failed.
>>
>> Decrement the reference count of prev when dma_fence_add_callback()
>> fails, ensuring proper balance.
>>
>> Cc: stable@xxxxxxxxxxxxxxx
>> Fixes: 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and
>> fini")
>> Signed-off-by: qianyi liu <liuqianyi125@xxxxxxxxx>
>
> @Matt: since you in principle agreed with this patch, could you give it
> an official RB?
>
> I could then take it [but will probably rephrase some nits in the
> commit message]
Hello,
This patch was submitted a while back but hasn't seen any updates—just a kindly
ping.
Best regards.
QianYi.