drm/amdkfd: Fix the memory overrun
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: c0cc999f3c
("drm/amdkfd: Fix the warning of array-index-out-of-bounds")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
407a5bdd55
commit
4cc16d64b6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue