Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: fix engine_class bounds check again
@ 2024-08-12 14:13 Matthew Auld
  2024-08-12 14:22 ` Cavitt, Jonathan
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Matthew Auld @ 2024-08-12 14:13 UTC (permalink / raw)
  To: intel-xe; +Cc: Dominik Grzegorzek, Mika Kuoppala, Matthew Brost

This was fixed in commit b7dce525c4fc ("drm/xe/queue: fix engine_class
bounds check"), but then re-introduced in commit 6f20fc09936e ("drm/xe:
Move and export xe_hw_engine lookup.") which should only be simple code
movement of the existing function.

Fixes: 6f20fc09936e ("drm/xe: Move and export xe_hw_engine lookup.")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_hw_engine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index 402dfa748e16..e195022ca836 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -1189,7 +1189,7 @@ xe_hw_engine_lookup(struct xe_device *xe,
 {
 	unsigned int 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.46.0


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

end of thread, other threads:[~2024-08-15 19:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 14:13 [PATCH] drm/xe: fix engine_class bounds check again Matthew Auld
2024-08-12 14:22 ` Cavitt, Jonathan
2024-08-12 14:30 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-12 14:31 ` ✓ CI.checkpatch: " Patchwork
2024-08-12 14:32 ` ✓ CI.KUnit: " Patchwork
2024-08-12 14:44 ` ✓ CI.Build: " Patchwork
2024-08-12 14:46 ` ✓ CI.Hooks: " Patchwork
2024-08-12 14:47 ` ✓ CI.checksparse: " Patchwork
2024-08-12 15:08 ` ✓ CI.BAT: " Patchwork
2024-08-12 20:01 ` ✗ CI.FULL: failure " Patchwork
2024-08-15 19:23 ` [PATCH] " Lucas De Marchi

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