]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Mar 2023 14:06:07 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Mar 2023 14:06:07 +0000 (16:06 +0200)
added patches:
drm-amdkfd-fix-the-memory-overrun.patch

queue-6.1/drm-amdkfd-fix-the-memory-overrun.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/drm-amdkfd-fix-the-memory-overrun.patch b/queue-6.1/drm-amdkfd-fix-the-memory-overrun.patch
new file mode 100644 (file)
index 0000000..5ba4135
--- /dev/null
@@ -0,0 +1,33 @@
+From 4cc16d64b6cdb179a26fb389cae9dce788e88f5d Mon Sep 17 00:00:00 2001
+From: Ma Jun <Jun.Ma2@amd.com>
+Date: Sun, 6 Nov 2022 20:34:27 +0800
+Subject: drm/amdkfd: Fix the memory overrun
+
+From: Ma Jun <Jun.Ma2@amd.com>
+
+commit 4cc16d64b6cdb179a26fb389cae9dce788e88f5d upstream.
+
+Fix the memory overrun issue caused by wrong array size.
+
+Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
+Addresses-Coverity-ID: 1527133 ("Memory - corruptions")
+Fixes: c0cc999f3c32e6 ("drm/amdkfd: Fix the warning of array-index-out-of-bounds")
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_crat.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+@@ -1111,7 +1111,7 @@ static int kfd_parse_subtype_cache(struc
+                       props->cache_latency = cache->cache_latency;
+                       memcpy(props->sibling_map, cache->sibling_map,
+-                                      sizeof(props->sibling_map));
++                                      CRAT_SIBLINGMAP_SIZE);
+                       /* set the sibling_map_size as 32 for CRAT from ACPI */
+                       props->sibling_map_size = CRAT_SIBLINGMAP_SIZE;
index 744be745ff486562457e7875870795869d350daf..3bb861c2bb20bbd44ceb8ab92cd75f3c9cf7c073 100644 (file)
@@ -221,3 +221,4 @@ sched-fair-sanitize-vruntime-of-entity-being-migrated.patch
 drm-amdkfd-introduce-dummy-cache-info-for-property-asic.patch
 drm-amdkfd-fix-the-warning-of-array-index-out-of-bounds.patch
 drm-amdkfd-add-gc-11.0.4-kfd-support.patch
+drm-amdkfd-fix-the-memory-overrun.patch