Commit 4cc16d64 authored by Ma Jun's avatar Ma Jun Committed by Alex Deucher
Browse files

drm/amdkfd: Fix the memory overrun



Fix the memory overrun issue caused by wrong array size.

Signed-off-by: default avatarMa Jun <Jun.Ma2@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reported-by: default avatarcoverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527133 ("Memory - corruptions")
Fixes: c0cc999f ("drm/amdkfd: Fix the warning of array-index-out-of-bounds")
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 407a5bdd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;