]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Taint all shrinkable object locks
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 29 May 2020 18:32:03 +0000 (19:32 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 29 May 2020 22:38:28 +0000 (23:38 +0100)
commit697770c4f225e6f9136e15bba4d77e910fb79694
tree90eeef92c4a4e7678535866c76bf7f521acec793
parentb2d628e1baaefef2e0909fd3a0b1a7e97462d1f4
drm/i915/gem: Taint all shrinkable object locks

If we declare that an object type is shrinkable (any that we can reclaim
to recover system pages), make sure we taint the object mutex so that
lockdep expects us to use it within fs_reclaim. lockdep will then
complain the first time we try to allocate while holding the plain
mutex, as doing so invites potential recursion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200529183204.16850-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_object.c