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>
Thu, 8 Apr 2021 04:36:40 +0000 (00:36 -0400)
commit1b0b6e939f112949089e32ec89fd27796677263a
tree5d5f2d50f79cfdb5a026d5d8ba41f7aba934f092
parentdf7232c4c676be29f1cf45058ec156c1183539ff
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>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c