]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/msm: Fix a fence leak in submit error path
authorRob Clark <robdclark@chromium.org>
Wed, 14 May 2025 16:33:32 +0000 (09:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 14:03:15 +0000 (16:03 +0200)
commitfe2695b2f63bd77e0e03bc0fc779164115bb4699
tree51fa969b6e32fabaf5b4d6462fba4b934ed7ada3
parent5df2087c9a1e127eaacb257b9e064d534b1f1443
drm/msm: Fix a fence leak in submit error path

[ Upstream commit 5d319f75ccf7f0927425a7545aa1a22b3eedc189 ]

In error paths, we could unref the submit without calling
drm_sched_entity_push_job(), so msm_job_free() will never get
called.  Since drm_sched_job_cleanup() will NULL out the
s_fence, we can use that to detect this case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/653584/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/msm_gem_submit.c