Skip to content

Commit b7dce52

Browse files
matt-auldLucas De Marchi
authored andcommitted
drm/xe/queue: fix engine_class bounds check
The engine_class is the index into the user_to_xe_engine_class, therefore it needs to be less than. Fixes: dd08ebf ("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> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240318180532.57522-4-matthew.auld@intel.com (cherry picked from commit fe87b7d) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 9c12563 commit b7dce52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/xe/xe_exec_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ find_hw_engine(struct xe_device *xe,
448448
{
449449
u32 idx;
450450

451-
if (eci.engine_class > ARRAY_SIZE(user_to_xe_engine_class))
451+
if (eci.engine_class >= ARRAY_SIZE(user_to_xe_engine_class))
452452
return NULL;
453453

454454
if (eci.gt_id >= xe->info.gt_count)

0 commit comments

Comments
 (0)