Commit cd54323e authored by Ernst Sjöstrand's avatar Ernst Sjöstrand Committed by Alex Deucher
Browse files

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: stable@vger.kernel.org
Signed-off-by: default avatarErnst Sjöstrand <ernstp@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9ad54467
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;