drm/amdgpu: Fix potential fence use-after-free v2
authorshanzhulig <shanzhulig@gmail.com>
Wed, 28 Jun 2023 01:10:47 +0000 (18:10 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Jun 2023 17:12:16 +0000 (13:12 -0400)
commit2e54154b9f27262efd0cb4f903cc7d5ad1fe9628
treef5437b73169a7273988e8a834b5ec41576b279df
parentb75efe88b20c2be28b67e2821a794cc183e32374
drm/amdgpu: Fix potential fence use-after-free v2

fence Decrements the reference count before exiting.
Avoid Race Vulnerabilities for fence use-after-free.

v2 (chk): actually fix the use after free and not just move it.

Signed-off-by: shanzhulig <shanzhulig@gmail.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c