drm/amdgpu: Fix size overflow
authorxinhui pan <xinhui.pan@amd.com>
Wed, 7 Apr 2021 11:29:39 +0000 (19:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:54:13 +0000 (16:54 -0400)
commitb16e685725a92bd7fd8496e38468622caf743771
tree84ba794628ebf72c79085c543692bba9ed0791c4
parentd844c6d74740b3bd7795140b00d28dcc5ef78665
drm/amdgpu: Fix size overflow

ttm->num_pages is uint32. Hit overflow when << PAGE_SHIFT directly

Fixes: 230c079fdcf4 ("drm/ttm: make num_pages uint32_t")
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c