]> 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)
commiteac5f4ba43161a8330f891c8d196855cb28cf9e1
tree4098ca3771eb9e84aa52ff2bfb00b1cc41ac7da8
parenta099292932f0ce537510bf9b6bf28486fa2db8bb
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