FAILED: patch "[PATCH] drm/amdgpu/mmhub4.2.0: add bounds checking for cid" failed to apply to 6.18-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 9c52f49545478aa47769378cd0b53c5005d6a846
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026032101-polygon-professed-f53c@gregkh' --subject-prefix 'PATCH 6.18.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 9c52f49545478aa47769378cd0b53c5005d6a846 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Wed, 4 Mar 2026 17:26:17 -0500
Subject: [PATCH] drm/amdgpu/mmhub4.2.0: add bounds checking for cid
The value should never exceed the array size as those are the only values the hardware is expected to return, but add checks anyway.
drivers/gpu/drm/amd/amdgpu/mmhub_v4_2_0.c +2 -1
@@ -688,7 +688,8 @@ mmhub_v4_2_0_print_l2_protection_fault_status(struct amdgpu_device *adev, status);switch (amdgpu_ip_version (adev,MMHUB_HWIP ,0 )) {case IP_VERSION (4 ,2 ,0 ): - mmhub_cid = mmhub_client_ids_v4_2_0[cid][rw]; + mmhub_cid = cid <ARRAY_SIZE (mmhub_client_ids_v4_2_0) ? + mmhub_client_ids_v4_2_0[cid][rw] :NULL ;break ;default : mmhub_cid =NULL ;