mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00:00
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;
|
||||
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user