All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH] drm/xe: Fix overflow in vram manager
@ 2023-03-09 13:18 Riana Tauro
  2023-03-09 16:51 ` Dixit, Ashutosh
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Riana Tauro @ 2023-03-09 13:18 UTC (permalink / raw)
  To: intel-xe; +Cc: anshuman.gupta, rodrigo.vivi

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>
---
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-14 10:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 13:18 [Intel-xe] [PATCH] drm/xe: Fix overflow in vram manager Riana Tauro
2023-03-09 16:51 ` Dixit, Ashutosh
2023-03-14  4:48   ` Riana Tauro
2023-03-14  8:27     ` Matthew Auld
2023-03-14  8:52       ` Matthew Auld
2023-03-14 10:03         ` Riana Tauro
2023-03-13 16:46 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-03-13 16:47 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-03-13 16:51 ` [Intel-xe] ✓ CI.Build: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.