mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 03:57:34 -04:00
drm/xe: fix engine_class bounds check again
This was fixed in commitb7dce525c4("drm/xe/queue: fix engine_class bounds check"), but then re-introduced in commit6f20fc0993("drm/xe: Move and export xe_hw_engine lookup.") which should only be simple code movement of the existing function. Fixes:6f20fc0993("drm/xe: Move and export xe_hw_engine lookup.") Signed-off-by: Matthew 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: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240812141331.729843-2-matthew.auld@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
committed by
Lucas De Marchi
parent
4551d60299
commit
23ab1cb659
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user