]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix possible uninitialized variable in parallel extension
authorMatthew Brost <matthew.brost@intel.com>
Sun, 19 Dec 2021 00:19:09 +0000 (16:19 -0800)
committerJani Nikula <jani.nikula@intel.com>
Mon, 27 Dec 2021 09:33:34 +0000 (11:33 +0200)
commitcb2e419c7e5b16b9fbf45f93a962d52935ded100
tree32066af8b574aa41fc04c1ad3b857f4ee06eaa79
parentfa6a89fde43e063fdeeeb11ba3c19fd7722e0105
drm/i915: Fix possible uninitialized variable in parallel extension

'prev_engine' was declared inside the output loop and checked in the
inner after at least 1 pass of either loop. The variable should be
declared outside both loops as it needs to be persistent across the
entire loop structure.

Fixes: 6032c33f4695 ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211219001909.24348-1-matthew.brost@intel.com
(cherry picked from commit cbffbac9c14220b8716b0a9c29d72243f6b14ef3)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gem/i915_gem_context.c