]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/sched: Fix fence reference count leak
authorqianyi liu <liuqianyi125@gmail.com>
Tue, 11 Mar 2025 06:02:51 +0000 (14:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Mar 2025 21:04:57 +0000 (22:04 +0100)
commit35399c84dcedd6d31448fb9e1336ef52673f2882
treed1687bdb9a94bcea5f39bf1d690fafac00955694
parentf5e049028124f755283f2c07e7a3708361ed1dc8
drm/sched: Fix fence reference count leak

commit a952f1ab696873be124e31ce5ef964d36bce817f upstream.

The last_scheduled fence leaks when an entity is being killed and adding
the cleanup callback fails.

Decrement the reference count of prev when dma_fence_add_callback()
fails, ensuring proper balance.

Cc: stable@vger.kernel.org # v6.2+
[phasta: add git tag info for stable kernel]
Fixes: 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini")
Signed-off-by: qianyi liu <liuqianyi125@gmail.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250311060251.4041101-1-liuqianyi125@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/scheduler/sched_entity.c