]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/breadcrumbs: Update bottom-half before marking as complete
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Mar 2017 21:07:23 +0000 (21:07 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Mar 2017 21:45:38 +0000 (21:45 +0000)
commit1b51af0ef85fc8877b4d3cc85514507abe207a51
tree19da7b56432bddd155b8df604b14244facdbde45
parent3c894bfc85fac0170a00904194f1af443049e065
drm/i915/breadcrumbs: Update bottom-half before marking as complete

When adding a new request to the breadcrumb rbtree, we mark all those
requests inside the rbtree that are already completed as complete. This
wakes those waiters up and allows them to skip the spinlock before
returning to userspace. If one of those is the current bottom-half and
allocated its intel_wait on the stack, it may then overwrite the
b->irq_wait upon exiting i915_wait_request() just as the interrupt handler
dereferences it.

Fixes: 1dbb2764dda4 ("drm/i915: Signal first fence from irq handler if complete")
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>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170315210726.12095-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_breadcrumbs.c