]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: avoid integer overflow in VA range check
authorCe Sun <cesun102@amd.com>
Mon, 11 May 2026 10:04:57 +0000 (18:04 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 16:15:41 +0000 (12:15 -0400)
commitcd7cfcdb4dd45c79ef6825a3dc918782f604f5ed
tree06d1ac77ee71c40cd90b8773d465a5accefbb96e
parent893fea60f8393fc99fa522f1718690421a5f9951
drm/amdgpu: avoid integer overflow in VA range check

The original addition operation in 64-bit unsigned type may encounter
overflow situations. To prevent such issues and safely reject invalid
inputs, the check_add_overflow() function is used.

Signed-off-by: Ce Sun <cesun102@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit cc768f4dd0bb9083c813683eeec44fc23921f771)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c