]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Clear breadcrumb node when cancelling signaling
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Nov 2017 12:14:58 +0000 (12:14 +0000)
committerJani Nikula <jani.nikula@intel.com>
Tue, 21 Nov 2017 09:39:56 +0000 (11:39 +0200)
commit12e5f6c2c4fb8f9b8510b5b05cbba72bb690d9f4
treeb2c688b2d592c59c87a184bd0029326e2cb87e80
parent7df7383f1072f7b1a7970f098e36de139e345f6c
drm/i915: Clear breadcrumb node when cancelling signaling

When we call intel_engine_cancel_signaling() to stop reporting when
a request is completed via an asynchronous signal, we remove that request
from the breadcrumb wait queue. However, we may be concurrently
processing that request in the signaler itself, the actual operations on
the request's node itself are serialised but we do not actually clear the
waiter after removing it from the tree allowing both parties to attempt
to do so and corrupting the rbtree. (Previously removing from the
breadcrumb wait queue could only be done on behalf of i915_wait_request,
so this race could not happen).

Reported-by: "He, Bo" <bo.he@intel.com>
Fixes: 0843e0026e87 ("drm/i915: Allow a request to be cancelled")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "He, Bo" <bo.he@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: MichaƂ Winiarski <michal.winiarski@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171115121458.24655-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
(cherry picked from commit c534612e780c4a2c8ef5bfc11583c7d58436baca)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_breadcrumbs.c