linux/drivers/gpu/drm/i915/gem
Matthew Brost af628cdd64 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: d4433c7600 ("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
(cherry picked from commit 84edf53776)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-10-13 13:41:16 +03:00
..
selftests drm/i915/selftests: Always initialize err in igt_dmabuf_import_same_driver_lmem() 2021-09-14 19:48:30 +03:00
i915_gem_busy.c dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
i915_gem_clflush.c drm/i915: Drop error handling from dma_fence_work 2021-07-16 21:47:39 +02:00
i915_gem_clflush.h
i915_gem_context_types.h drm/i915/gem: Delay context creation (v3) 2021-07-08 19:48:52 +02:00
i915_gem_context.c drm/i915: Fix bug in user proto-context creation that leaked contexts 2021-10-13 13:41:16 +03:00
i915_gem_context.h drm/i915: move gem_context slab to direct module init/exit 2021-07-28 16:45:58 +02:00
i915_gem_create.c drm/i915/gem: Unify user object creation (v3) 2021-07-26 16:37:33 +01:00
i915_gem_dmabuf.c drm/i915/gem: Migrate to system at dma-buf attach time (v7) 2021-07-26 16:37:38 +01:00
i915_gem_domain.c drm/i915/uapi: reject set_domain for discrete 2021-07-23 11:55:32 +01:00
i915_gem_execbuffer.c Merge tag 'drm-intel-gt-next-2021-08-06-1' of ssh://git.freedesktop.org/git/drm/drm-intel into drm-next 2021-08-12 09:56:04 +10:00
i915_gem_internal.c Merge branch 'stable/for-linus-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2021-09-03 10:34:44 -07:00
i915_gem_ioctls.h drm/i915/uapi: introduce drm_i915_gem_create_ext 2021-05-04 10:58:56 +01:00
i915_gem_lmem.c drm/i915: support forcing the page size with lmem 2021-06-30 13:24:29 +01:00
i915_gem_lmem.h drm/i915: support forcing the page size with lmem 2021-06-30 13:24:29 +01:00
i915_gem_mman.c drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC 2021-07-22 10:07:23 -07:00
i915_gem_mman.h
i915_gem_object_types.h drm/i915/ehl: unconditionally flush the pages on acquire 2021-07-27 09:16:46 +01:00
i915_gem_object.c drm/i915: move gem_objects slab to direct module init/exit 2021-07-28 16:45:58 +02:00
i915_gem_object.h drm/i915: move gem_objects slab to direct module init/exit 2021-07-28 16:45:58 +02:00
i915_gem_pages.c drm/i915: Remove allow_alloc from i915_gem_object_get_sg* 2021-07-16 21:47:07 +02:00
i915_gem_phys.c drm/i915: Update object placement flags to be mutable 2021-06-24 18:50:56 +01:00
i915_gem_pm.c drm/i915: Finally remove obj->mm.lock. 2021-03-24 17:47:20 +01:00
i915_gem_pm.h
i915_gem_region.c drm/i915: support forcing the page size with lmem 2021-06-30 13:24:29 +01:00
i915_gem_region.h drm/i915: support forcing the page size with lmem 2021-06-30 13:24:29 +01:00
i915_gem_shmem.c drm/i915/ehl: unconditionally flush the pages on acquire 2021-07-27 09:16:46 +01:00
i915_gem_shrinker.c drm/i915: Fix runtime pm handling in i915_gem_shrink 2021-10-05 11:52:47 +03:00
i915_gem_shrinker.h drm/i915: Finally remove obj->mm.lock. 2021-03-24 17:47:20 +01:00
i915_gem_stolen.c Merge tag 'drm-intel-next-2021-08-10-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-08-12 11:20:17 +10:00
i915_gem_stolen.h drm/i915/ttm Initialize the ttm device and memory managers 2021-06-02 13:21:24 +01:00
i915_gem_throttle.c
i915_gem_tiling.c drm/i915/gem: replace IS_GEN and friends with GRAPHICS_VER 2021-06-05 15:09:43 -07:00
i915_gem_ttm.c drm/i915: Move __i915_gem_free_object to ttm_bo_destroy 2021-09-21 13:36:34 +03:00
i915_gem_ttm.h drm/i915: support forcing the page size with lmem 2021-06-30 13:24:29 +01:00
i915_gem_userptr.c RDMA v5.15 merge window Pull Request 2021-09-02 14:47:21 -07:00
i915_gem_wait.c drm/i915/gem: Implement object migration 2021-06-30 11:32:11 +01:00
i915_gemfs.c
i915_gemfs.h