From: jsg Date: Wed, 23 Oct 2024 04:16:05 +0000 (+0000) Subject: drm/amdgpu: prevent BO_HANDLES error from being overwritten X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5b5a95fddd461e46aad76316cb3ec80695176cb4;p=openbsd 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 --- 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)