From 0240922baa096563c1b1923384f7bff650a4846b Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 31 Mar 2023 02:16:10 +0000 Subject: [PATCH] drm/amdkfd: Fix the memory overrun From Ma Jun 8c31b663edc1cc5eb5c82282ab6ca99c69d1d942 in linux-6.1.y/6.1.22 4cc16d64b6cdb179a26fb389cae9dce788e88f5d in mainline linux --- sys/dev/pci/drm/amd/amdkfd/kfd_crat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_crat.c b/sys/dev/pci/drm/amd/amdkfd/kfd_crat.c index f522e1c90dd..e45c6bc8d10 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_crat.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_crat.c @@ -1111,7 +1111,7 @@ static int kfd_parse_subtype_cache(struct crat_subtype_cache *cache, 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; -- 2.20.1