]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: fix out-of-bound read on pptable->SkuReserved
authorColin Ian King <colin.king@canonical.com>
Wed, 28 Oct 2020 12:43:16 +0000 (12:43 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Oct 2020 05:02:18 +0000 (01:02 -0400)
commiteeef3c18256f1f9a757f0e017c0464832c31f713
treedd687f56866d14beba403f490933ca69906c321a
parentff6a7d3fd9a8853f7e310c31b0701cd5c96a8406
drm/amd/pm: fix out-of-bound read on pptable->SkuReserved

A recent change added two uint16_t elements to PPTable_t and reduced the
uint32_t array down to 8 elements. This results in the dev_info printing
of pptable->SkuReserved[8] accessing a value that is out-of-range on
array SkuReserved.  The array has been shrunk by 1 element, so remove
this extraneous dev_info message.

Addresses-Coverity: ("Out-of-bounds read")
Fixes: 824f63eceb9f ("drm/amd/pm: update driver if file for sienna cichlid")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c