diff options
author | Matthew Brost <matthew.brost@intel.com> | 2021-10-01 08:58:25 -0700 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2021-10-05 10:19:39 +0100 |
commit | 84edf53776343d6b5bf5fa59a6f600a22ca23c40 (patch) | |
tree | 8634060d805ab1ced277e9f8c920065b0004b56e /drivers/gpu/drm/i915/display/intel_display.c | |
parent | 4b2437f6f7b05ffcc7007f8e8d4f028ab86707dd (diff) | |
download | linux-84edf53776343d6b5bf5fa59a6f600a22ca23c40.tar.gz linux-84edf53776343d6b5bf5fa59a6f600a22ca23c40.tar.bz2 linux-84edf53776343d6b5bf5fa59a6f600a22ca23c40.zip |
drm/i915: Fix bug in user proto-context creation that leaked contexts
Set number of engines before attempting to create contexts so the
function free_engines can clean up properly. Also check return of
alloc_engines for NULL.
v2:
(Tvrtko)
- Send as stand alone patch
(John Harrison)
- Check for alloc_engines returning NULL
v3:
(Checkpatch / Tvrtko)
- Remove braces around single line if statement
Cc: Jason Ekstrand <jason@jlekstrand.net>
Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)")
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211001155825.6762-1-matthew.brost@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_display.c')
0 files changed, 0 insertions, 0 deletions