提交 b7d698d7 编写于 作者: C Christian König 提交者: Alex Deucher

drm/amdgpu: fix overflow on 32bit systems

mem->start is a long, so this can overflow on 32bit systems.
Signed-off-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NJammy Zhou <Jammy.Zhou@amd.com>
Cc: stable@vger.kernel.org
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册