Skip to content

Commit b7dce52

Browse files
matt-auldlucasdemarchi
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 <[email protected]> Cc: Nirmoy Das <[email protected]> Reviewed-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit fe87b7d) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 9c12563 commit b7dce52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)