]> www.infradead.org Git - users/hch/misc.git/commit
drm/amdgu: fix Unintentional integer overflow for mall size
authorJesse Zhang <jesse.zhang@amd.com>
Wed, 29 May 2024 09:29:01 +0000 (17:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Jun 2024 14:58:36 +0000 (10:58 -0400)
commitc09d2eff81a997c169e0cacacd6b60c5e3aa33f2
tree031ce40e6ac513d4fcd18330e77db880bd21873b
parenta474161e84fc0b15534a80f8dfcbaf5e48fd8249
drm/amdgu: fix Unintentional integer overflow for mall size

Potentially overflowing expression mall_size_per_umc * adev->gmc.num_umc with type unsigned int (32 bits, unsigned)
is evaluated using 32-bit arithmetic,and then used in a context that expects an expression of type u64 (64 bits, unsigned).

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c