From 8f0674ba9cf66ce4b4909e127d7e37d132d15653 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 17 Aug 2023 03:37:18 +0000 Subject: [PATCH] drm/amdgpu: fix possible UAF in amdgpu_cs_pass1() From Alex Deucher 9a2393af1f35d1975204fc00035c64a1c792b278 in linux-6.1.y/6.1.46 90e065677e0362a777b9db97ea21d43a39211399 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c index 8f9a1cfe26d..b2b64a6f79a 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c @@ -287,7 +287,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p, if (!p->gang_size) { ret = -EINVAL; - goto free_partial_kdata; + goto free_all_kdata; } for (i = 0; i < p->gang_size; ++i) { -- 2.20.1