Commit b7d698d7 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix overflow on 32bit systems

mem->start is a long, so this can overflow on 32bit systems.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarJammy Zhou <Jammy.Zhou@amd.com>
Cc: stable@vger.kernel.org
parent 1886d1a9
......@@ -855,7 +855,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
int r;
if (mem) {
addr = mem->start << PAGE_SHIFT;
addr = (u64)mem->start << PAGE_SHIFT;
if (mem->mem_type != TTM_PL_TT)
addr += adev->vm_manager.vram_base_offset;
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment