drm/amdgpu: fix overflow on 32bit systems
mem->start is a long, so this can overflow on 32bit systems. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Cc: stable@vger.kernel.org
This commit is contained in:
parent
1886d1a9ca
commit
b7d698d7fd
|
@ -855,7 +855,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if (mem) {
|
if (mem) {
|
||||||
addr = mem->start << PAGE_SHIFT;
|
addr = (u64)mem->start << PAGE_SHIFT;
|
||||||
if (mem->mem_type != TTM_PL_TT)
|
if (mem->mem_type != TTM_PL_TT)
|
||||||
addr += adev->vm_manager.vram_base_offset;
|
addr += adev->vm_manager.vram_base_offset;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue