diff options
author | Christian König <christian.koenig@amd.com> | 2015-09-07 10:32:09 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-09-23 21:23:33 (GMT) |
commit | b7d698d7fd7d132c6ebe56d230584f2cae6c94ee (patch) | |
tree | 3c227faefa5d3435e6820ef7340a51bbc20d27e0 /drivers/gpu/drm | |
parent | 1886d1a9caed20f457dd69a926c7f8b54c2d5f48 (diff) | |
download | linux-b7d698d7fd7d132c6ebe56d230584f2cae6c94ee.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index f68b7cd..b68dcb9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -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 { |