]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Move obj->lut_list under its own lock
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 1 Jul 2020 08:44:39 +0000 (09:44 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 1 Jul 2020 10:58:49 +0000 (11:58 +0100)
commitb7517f6b816473cb456e6c8dc518262c4bb80941
tree4098ca3771eb9e84aa52ff2bfb00b1cc41ac7da8
parentd1c1a17b934dccfe9cd75faa12bf2978e686d5e1
drm/i915/gem: Move obj->lut_list under its own lock

The obj->lut_list is traversed when the object is closed as the file
table is destroyed during process termination. As this occurs before we
kill any outstanding context if, due to some bug or another, the closure
is blocked, then we fail to shootdown any inflight operations
potentially leaving the GPU spinning forever. As we only need to guard
the list against concurrent closures and insertions, the hold is short
and merits being treated as a simple spinlock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200701084439.17025-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/i915_gem_object_types.h