Commit 23ab1cb6 authored by Matthew Auld's avatar Matthew Auld Committed by Lucas De Marchi

drm/xe: fix engine_class bounds check again

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

Fixes: 6f20fc09 ("drm/xe: Move and export xe_hw_engine lookup.")
Signed-off-by: default avatarMatthew 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>
Reviewed-by: default avatarJonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240812141331.729843-2-matthew.auld@intel.comSigned-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent 4551d602
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment