1
0
mirror of https://github.com/openbsd/src.git synced 2026-05-01 17:46:35 +00:00

drm/amdgpu: disallow multiple BO_HANDLES chunks in one submit

From Pierre-Eric Pelloux-Prayer
44e4aeaef96b2624b341597b1a8e595c89925892 in linux-6.6.y/6.6.55
fec5f8e8c6bcf83ed7a392801d7b44c5ecfc1e82 in mainline linux
This commit is contained in:
jsg
2024-10-11 02:04:07 +00:00
parent 1086cb9764
commit a5f3710f75

View File

@@ -263,6 +263,10 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
if (size < sizeof(struct drm_amdgpu_bo_list_in))
goto free_partial_kdata;
/* Only a single BO list is allowed to simplify handling. */
if (p->bo_list)
ret = -EINVAL;
ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata);
if (ret)
goto free_partial_kdata;