]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Take timeline->mutex to walk list-of-requests
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 29 Nov 2019 15:18:45 +0000 (15:18 +0000)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 2 Dec 2019 09:30:52 +0000 (11:30 +0200)
commitc9062e91870434615666360185bdee5835f38861
tree9b783f8c09a5dbdb783cc48b670b3f927baf5968
parent0c54e12bc59031606be446969834bfbd6fe4002d
drm/i915/gem: Take timeline->mutex to walk list-of-requests

Though the context is closed and so no more requests can be added to the
timeline, retirement can still be removing requests. It can even be
removing the very request we are inspecting and so cause us to wander
into dead links.

Serialise with the retirement by taking the timeline->mutex used for
guarding the timeline->requests list.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112404
Fixes: ee80fd16aa52 ("drm/i915/gem: Refine occupancy test in kill_context()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191129151845.1092933-1-chris@chris-wilson.co.uk
(cherry picked from commit 7ce596a8036cf3a4cb9ffa0c4edd8a76a7a43cc3)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/gem/i915_gem_context.c