[Intel-gfx] [PATCH] drm/i915/gem: Keep request alive while attaching fences
Matthew Auld
matthew.william.auld at gmail.com
Tue Dec 17 13:56:59 UTC 2019
On Tue, 17 Dec 2019 at 13:47, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> Since commit e5dadff4b093 ("drm/i915: Protect request retirement with
> timeline->mutex"), the request retirement can happen outside of the
> struct_mutex serialised only by the timeline->mutex. We drop the
> timeline->mutex on submitting the request (i915_request_add) so after
> that point, it is liable to be freed. Make sure our local reference is
> kept alive until we have finished attaching it to the signalers. (Note
> that this erodes the argument that i915_request_add should consume the
> reference, but that is a slightly larger patch!)
>
> Fixes: e5dadff4b093 ("drm/i915: Protect request retirement with timeline->mutex")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.auld at intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
More information about the Intel-gfx
mailing list