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>
This commit is contained in:
parent
ce99814973
commit
b3f4bdda99
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue