diff options
author | Riana Tauro <riana.tauro@intel.com> | 2023-03-09 18:48:56 +0530 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:29:46 -0500 |
commit | 11823d48abce17d45e7e8c9bd525203f0096c6e8 (patch) | |
tree | 41a192658f2d93e03c01c0ce6b28ef79eb40e6f5 /drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | |
parent | 6d4f49b7dec3126c6d5491bcea5ae815b025d042 (diff) |
drm/xe: Fix overflow in vram manager
The overflow caused xe_bo_restore_kernel to return an error
Fix overflow in vram manager alloc function.
Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_ttm_vram_mgr.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c index 643365b18bc7..159ca7105df1 100644 --- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c +++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c @@ -118,7 +118,7 @@ static int xe_ttm_vram_mgr_new(struct ttm_resource_manager *man, cur_size = size; - if (fpfn + size != place->lpfn << PAGE_SHIFT) { + if (fpfn + size != (u64)place->lpfn << PAGE_SHIFT) { /* * Except for actual range allocation, modify the size and * min_block_size conforming to continuous flag enablement |