drm/amdgpu: prevent BO_HANDLES error from being overwritten
authorjsg <jsg@openbsd.org>
Wed, 23 Oct 2024 04:16:05 +0000 (04:16 +0000)
committerjsg <jsg@openbsd.org>
Wed, 23 Oct 2024 04:16:05 +0000 (04:16 +0000)
From Mohammed Anees
64cf93b87fe34e72557de294718019c0ad2931b4 in linux-6.6.y/6.6.58
c0ec082f10b7a1fd25e8c1e2a686440da913b7a3 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c

index 784e66c..a2f2fe6 100644 (file)
@@ -265,7 +265,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
 
                        /* Only a single BO list is allowed to simplify handling. */
                        if (p->bo_list)
-                               ret = -EINVAL;
+                               goto free_partial_kdata;
 
                        ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata);
                        if (ret)