From f46f816e1a3796e025d4369b2410d9a54cac5c59 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Sep 2024 09:44:41 +0000 Subject: [PATCH] drm/amdgu: fix Unintentional integer overflow for mall size From Jesse Zhang 54a11ce4ff2a01fc2a231c546a864883633d2b97 in linux-6.6.y/6.6.50 c09d2eff81a997c169e0cacacd6b60c5e3aa33f2 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_discovery.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_discovery.c index 0a03218cc89..c10dbf34ae8 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_discovery.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_discovery.c @@ -1567,7 +1567,7 @@ static int amdgpu_discovery_get_mall_info(struct amdgpu_device *adev) break; case 2: mall_size_per_umc = le32_to_cpu(mall_info->v2.mall_size_per_umc); - adev->gmc.mall_size = mall_size_per_umc * adev->gmc.num_umc; + adev->gmc.mall_size = (uint64_t)mall_size_per_umc * adev->gmc.num_umc; break; default: dev_err(adev->dev, -- 2.20.1