aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErnst Sjöstrand <[email protected]>2021-09-02 07:50:27 +0000
committerAlex Deucher <[email protected]>2021-09-02 16:39:41 +0000
commitcd54323e762ddda11552ee5258d35a3a7cc5cc0f (patch)
tree33c6a75aa4af7aa1f41588112e37d9f0d7229b07
parentdrm/amd/display: Fix unused initialization of pointer sink (diff)
downloadkernel-cd54323e762ddda11552ee5258d35a3a7cc5cc0f.tar.gz
kernel-cd54323e762ddda11552ee5258d35a3a7cc5cc0f.zip
drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10
Seems like newer cards can have even more instances now. Found by UBSAN: array-index-out-of-bounds in drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:318:29 index 8 is out of range for type 'uint32_t *[8]' Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1697 Cc: [email protected] Signed-off-by: Ernst Sjöstrand <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index dc3c6b3a00e5..d356e329e6f8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -758,7 +758,7 @@ enum amd_hw_ip_block_type {
MAX_HWIP
};
-#define HWIP_MAX_INSTANCE 8
+#define HWIP_MAX_INSTANCE 10
struct amd_powerplay {
void *pp_handle;