Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/xe/queue: fix engine_class bounds check
@ 2024-03-18 18:05 Matthew Auld
  2024-03-18 18:05 ` [PATCH 2/3] drm/xe/device: fix XE_MAX_GT_PER_TILE check Matthew Auld
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Matthew Auld @ 2024-03-18 18:05 UTC (permalink / raw)
  To: intel-xe; +Cc: Nirmoy Das

The engine_class is the index into the user_to_xe_engine_class,
therefore it needs to be less than.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/xe/xe_exec_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 6a83bc57826a..2016c1af9633 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -440,7 +440,7 @@ find_hw_engine(struct xe_device *xe,
 {
 	u32 idx;
 
-	if (eci.engine_class > ARRAY_SIZE(user_to_xe_engine_class))
+	if (eci.engine_class >= ARRAY_SIZE(user_to_xe_engine_class))
 		return NULL;
 
 	if (eci.gt_id >= xe->info.gt_count)
-- 
2.44.0


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

end of thread, other threads:[~2024-03-19  1:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 18:05 [PATCH 1/3] drm/xe/queue: fix engine_class bounds check Matthew Auld
2024-03-18 18:05 ` [PATCH 2/3] drm/xe/device: fix XE_MAX_GT_PER_TILE check Matthew Auld
2024-03-18 18:42   ` Nirmoy Das
2024-03-18 18:05 ` [PATCH 3/3] drm/xe/device: fix XE_MAX_TILES_PER_DEVICE check Matthew Auld
2024-03-18 18:42 ` [PATCH 1/3] drm/xe/queue: fix engine_class bounds check Nirmoy Das
2024-03-19  1:00 ` ✓ CI.Patch_applied: success for series starting with [1/3] " Patchwork
2024-03-19  1:00 ` ✓ CI.checkpatch: " Patchwork
2024-03-19  1:01 ` ✓ CI.KUnit: " Patchwork
2024-03-19  1:12 ` ✓ CI.Build: " Patchwork
2024-03-19  1:14 ` ✓ CI.Hooks: " Patchwork
2024-03-19  1:15 ` ✓ CI.checksparse: " Patchwork
2024-03-19  1:42 ` ✓ CI.BAT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox