]> Git Repo - linux.git/commit
drm/xe/ct: prevent UAF in send_recv()
authorMatthew Auld <[email protected]>
Tue, 1 Oct 2024 08:43:47 +0000 (09:43 +0100)
committerMatthew Auld <[email protected]>
Thu, 3 Oct 2024 07:34:18 +0000 (08:34 +0100)
commit52789ce35c55ccd30c4b67b9cc5b2af55e0122ea
tree60800a2a1699c9b31e07f31708d90583230d3bbf
parent63e0695597a044c96bf369e4d8ba031291449d95
drm/xe/ct: prevent UAF in send_recv()

Ensure we serialize with completion side to prevent UAF with fence going
out of scope on the stack, since we have no clue if it will fire after
the timeout before we can erase from the xa. Also we have some dependent
loads and stores for which we need the correct ordering, and we lack the
needed barriers. Fix this by grabbing the ct->lock after the wait, which
is also held by the completion side.

v2 (Badal):
 - Also print done after acquiring the lock and seeing timeout.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Badal Nilawar <[email protected]>
Cc: <[email protected]> # v6.8+
Reviewed-by: Badal Nilawar <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/xe/xe_guc_ct.c
This page took 0.0552319999999999 seconds and 4 git commands to generate.