diff options
author | Andrzej Hajda <[email protected]> | 2023-08-21 17:30:35 +0200 |
---|---|---|
committer | Andi Shyti <[email protected]> | 2023-08-30 14:06:50 +0200 |
commit | 280410677af763f3871b93e794a199cfcf6fb580 (patch) | |
tree | f035e836f8881ce8729a5b68a5432a91677f81a9 /net/lapb/lapb_out.c | |
parent | 7467e1da906468bcbd311023b30708193103ecf9 (diff) |
drm/i915: mark requests for GuC virtual engines to avoid use-after-free
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
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 <[email protected]>
Signed-off-by: Andrzej Hajda <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Signed-off-by: Andi Shyti <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions