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

drm/amdgpu/mmhub3.0.1: add bounds checking for cid

From Alex Deucher
56f0473d3c6314502fdcf76e574985a585aa707d in linux-6.18.y/6.18.20
5d4e88bcfef29569a1db224ef15e28c603666c6d in mainline linux
This commit is contained in:
jsg
2026-03-25 23:29:33 +00:00
parent 1148f5939d
commit a87dfe1590

View File

@@ -117,7 +117,8 @@ mmhub_v3_0_1_print_l2_protection_fault_status(struct amdgpu_device *adev,
switch (amdgpu_ip_version(adev, MMHUB_HWIP, 0)) {
case IP_VERSION(3, 0, 1):
mmhub_cid = mmhub_client_ids_v3_0_1[cid][rw];
mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_v3_0_1) ?
mmhub_client_ids_v3_0_1[cid][rw] : NULL;
break;
default:
mmhub_cid = NULL;