summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
diff options
context:
space:
mode:
authorRiana Tauro <riana.tauro@intel.com>2023-03-09 16:18:56 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:29:46 +0300
commit11823d48abce17d45e7e8c9bd525203f0096c6e8 (patch)
tree41a192658f2d93e03c01c0ce6b28ef79eb40e6f5 /drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
parent6d4f49b7dec3126c6d5491bcea5ae815b025d042 (diff)
downloadlinux-11823d48abce17d45e7e8c9bd525203f0096c6e8.tar.xz
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.c2
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