[Intel-gfx] [PATCH] drm/i915: Hold reference to intel_context over life of i915_request

Andi Shyti andi.shyti at linux.intel.com
Thu Aug 3 09:48:58 UTC 2023


Hi Andrzej,

On Fri, Jul 28, 2023 at 09:54:50AM +0200, Andrzej Hajda wrote:
> References to i915_requests may be trapped by userspace inside a
> sync_file or dmabuf (dma-resv) and held indefinitely across different
> proceses. To counter-act the memory leaks, we try to not to keep

nit: lose one of the "to"'s :)

> references from the request past their completion.
> On the other side on fence release we need to know if rq->engine
> is valid and points to hw engine (true for non-virtual requests).
> To make it possible extra bit has been added to rq->execution_mask,
> for marking virtual engines.
> 
> Fixes: bcb9aa45d5a0 ("Revert "drm/i915: Hold reference to intel_context over life of i915_request"")
> Signed-off-by: Chris Wilson <chris.p.wilson at linux.intel.com>
> Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>

Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com> 

Thanks,
Andi


More information about the Intel-gfx mailing list