diff options
author | Young Xiao <YangX92@hotmail.com> | 2018-11-27 12:50:17 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-28 21:55:37 +0100 |
commit | b3f4bdda998be6018b76f46b852313ae74db5606 (patch) | |
tree | 16caed96b72ab97dcc4ad8d097a7b0a26e02ab50 /drivers/gpu/drm/radeon/radeon_vm.c | |
parent | drm/amd/pp: fix spelling mistake "dependancy" -> "dependency" (diff) | |
download | linux-b3f4bdda998be6018b76f46b852313ae74db5606.tar.xz linux-b3f4bdda998be6018b76f46b852313ae74db5606.zip |
drm: radeon: fix overflow on 32bit systems
the type mem->start is unsigned long, so this can overflow on
32bit system, since the type addr is uint64_t.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Young Xiao <YangX92@hotmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_vm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c index fed11ece0de6..a3d2ca07a058 100644 --- a/drivers/gpu/drm/radeon/radeon_vm.c +++ b/drivers/gpu/drm/radeon/radeon_vm.c @@ -946,7 +946,7 @@ int radeon_vm_bo_update(struct radeon_device *rdev, bo_va->flags &= ~RADEON_VM_PAGE_WRITEABLE; if (mem) { - addr = mem->start << PAGE_SHIFT; + addr = (u64)mem->start << PAGE_SHIFT; if (mem->mem_type != TTM_PL_SYSTEM) { bo_va->flags |= RADEON_VM_PAGE_VALID; } |