diff options
author | Matthew Auld <matthew.auld@intel.com> | 2024-03-18 18:05:33 +0000 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2024-03-19 08:47:47 +0000 |
commit | fe87b7dfcb204a161d1e38b0e787b2f5ab520f32 (patch) | |
tree | fcc5b7d4733d036f991379556bbb3435c28c58fc /drivers/gpu/drm/xe/xe_exec_queue.c | |
parent | 4f4fcafde343a54465f85a2909fc684918507a4b (diff) | |
download | linux-stable-fe87b7dfcb204a161d1e38b0e787b2f5ab520f32.tar.gz linux-stable-fe87b7dfcb204a161d1e38b0e787b2f5ab520f32.tar.bz2 linux-stable-fe87b7dfcb204a161d1e38b0e787b2f5ab520f32.zip |
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: dd08ebf6c352 ("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
Diffstat (limited to 'drivers/gpu/drm/xe/xe_exec_queue.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_exec_queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index 6a83bc57826a..2016c1af9633 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -440,7 +440,7 @@ find_hw_engine(struct xe_device *xe, { u32 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) |