[Intel-gfx] [PATCH] drm/i915: Call i915_sw_fence_fini on request cleanup

Mika Kuoppala mika.kuoppala at linux.intel.com
Thu Apr 11 12:33:30 UTC 2019


Chris Wilson <chris at chris-wilson.co.uk> writes:

> As i915_requests are put into an RCU-freelist, they may get reused
> before debugobjects notice them as being freed. On cleanup, explicitly
> call i915_sw_fence_fini() so that the debugobject is properly tracked.
>
> Reported-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Fixes: b7404c7ecb38 ("drm/i915: Bump ready tasks ahead of busywaits")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_request.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index a7d87cfaabcb..b836721d3b13 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -101,6 +101,7 @@ static void i915_fence_release(struct dma_fence *fence)
>  	 * caught trying to reuse dead objects.
>  	 */
>  	i915_sw_fence_fini(&rq->submit);
> +	i915_sw_fence_fini(&rq->semaphore);
>  
>  	kmem_cache_free(global.slab_requests, rq);
>  }
> -- 
> 2.20.1


More information about the Intel-gfx mailing list