summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-10-23 04:16:06 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-10-23 04:16:06 +0000
commit87482837236ddd1ef6af71b8678d3b0f89033345 (patch)
treef47420c60f554d411a7b670d03cc1b2239c27a6b /sys/dev/pci
parent0269ef0f844373e5c2792b65479caaba4b386e1d (diff)
drm/amdgpu: prevent BO_HANDLES error from being overwritten
From Mohammed Anees 64cf93b87fe34e72557de294718019c0ad2931b4 in linux-6.6.y/6.6.58 c0ec082f10b7a1fd25e8c1e2a686440da913b7a3 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
index 784e66c1e21..a2f2fe6500d 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
@@ -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)