[PATCH 1/1] drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Yuxuan Luo
yuxuan.luo at canonical.com
Thu Aug 29 16:49:46 UTC 2024
From: Dan Carpenter <dan.carpenter at linaro.org>
The "instance" variable needs to be signed for the error handling to work.
Fixes: 8b2faf1a4f3b ("drm/amdgpu: add error handle to avoid out-of-bounds")
Reviewed-by: Bob Zhou <bob.zhou at amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
(cherry picked from commit 6769a23697f17f9bf9365ca8ed62fe37e361a05a)
CVE-2024-41022
Signed-off-by: Yuxuan Luo <yuxuan.luo at canonical.com>
---
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 7487baa8ada67..9ed052e7a3e65 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2017,7 +2017,7 @@ static int sdma_v4_0_process_trap_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{
- uint32_t instance;
+ int instance;
DRM_DEBUG("IH: SDMA trap\n");
instance = sdma_v4_0_irq_id_to_seq(entry->client_id);
--
2.34.1
More information about the kernel-team
mailing list