]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/powerplay: fix off-by-one upper bounds limit checks
authorColin Ian King <colin.king@canonical.com>
Thu, 1 Aug 2019 11:15:41 +0000 (12:15 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Aug 2019 15:30:37 +0000 (10:30 -0500)
commitba1b64c0000a68c087a9d050c1c718bb61a87a3a
tree1c355b00731cf3d109e1e6442c8e9d33be0cb9bb
parentf9470079accbf34d58f454aed2e5c3eec5b175b5
drm/amd/powerplay: fix off-by-one upper bounds limit checks

There are two occurrances of off-by-one upper bound checking of indexes
causing potential out-of-bounds array reads. Fix these.

Addresses-Coverity: ("Out-of-bounds read")
Fixes: b49ee7a0d8bd ("drm/amd/powerplay: add smu feature name support")
Fixes: 096163c563ec ("drm/amd/powerplay: add smu message name support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c