6.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthew Auld <matthew.auld@xxxxxxxxx> commit 23ab1cb6591dba7c97b65eb407cd71147bd878b8 upstream. 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@xxxxxxxxx> Cc: Dominik Grzegorzek <dominik.grzegorzek@xxxxxxxxx> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> Cc: Matthew Brost <matthew.brost@xxxxxxxxx> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@xxxxxxxxx> Reviewed-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20240812141331.729843-2-matthew.auld@xxxxxxxxx Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/xe/xe_hw_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/xe/xe_hw_engine.c +++ b/drivers/gpu/drm/xe/xe_hw_engine.c @@ -1153,7 +1153,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)