]> git.itanic.dy.fi Git - linux-stable/commit
drm/amdgpu: drop redundant sched job cleanup when cs is aborted
authorGuchun Chen <guchun.chen@amd.com>
Wed, 26 Apr 2023 01:46:54 +0000 (09:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 12:02:01 +0000 (14:02 +0200)
commitec02a29c3c2ef8ad3e15a0e3f96b99a00e5d97b4
treeea6012fa75b024d3d75da20bf100048154206f3a
parent917680e6056aa288cac288d3afd2745d372beb61
drm/amdgpu: drop redundant sched job cleanup when cs is aborted

commit 1253685f0d3eb3eab0bfc4bf15ab341a5f3da0c8 upstream.

Once command submission failed due to userptr invalidation in
amdgpu_cs_submit, legacy code will perform cleanup of scheduler
job. However, it's not needed at all, as former commit has integrated
job cleanup stuff into amdgpu_job_free. Otherwise, because of double
free, a NULL pointer dereference will occur in such scenario.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2457
Fixes: f7d66fb2ea43 ("drm/amdgpu: cleanup scheduler job initialization v2")
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c