]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/amdgpu: cast mem->num_pages to 64-bits when shifting (v2)
authorTom St Denis <tom.stdenis@amd.com>
Fri, 14 Jun 2019 15:47:21 +0000 (11:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 Jun 2019 16:32:24 +0000 (11:32 -0500)
commite5552ca0481005d8e44204a081a42dce74682a6c
tree679895efa8a73ebb81278f758bbfde4ced465822
parentdbde6e08c7afcfc8d6ff64793d6b54e9bcd0e3d9
drm/amd/amdgpu: cast mem->num_pages to 64-bits when shifting (v2)

On 32-bit hosts mem->num_pages is 32-bits and can overflow
when shifted.  Add a cast to avoid this.

(v2): Style fix.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c