summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2023-08-18 07:59:38 -0700
committerChristian König <christian.koenig@amd.com>2023-08-23 10:22:49 +0200
commite531fdb5cd5ee2564b7fe10c8a9219e2b2fac61e (patch)
tree2f106df9f92e7ad37e8451d72686429cef76236f /drivers/gpu
parent5ad1ab30ac0809d2963ddcf39ac34317a24a2f17 (diff)
downloadlinux-stable-e531fdb5cd5ee2564b7fe10c8a9219e2b2fac61e.tar.gz
linux-stable-e531fdb5cd5ee2564b7fe10c8a9219e2b2fac61e.tar.bz2
linux-stable-e531fdb5cd5ee2564b7fe10c8a9219e2b2fac61e.zip
dma-buf/sw_sync: Avoid recursive lock during fence signal
If a signal callback releases the sw_sync fence, that will trigger a deadlock as the timeline_fence_release recurses onto the fence->lock (used both for signaling and the the timeline tree). To avoid that, temporarily hold an extra reference to the signalled fences until after we drop the lock. (This is an alternative implementation of https://patchwork.kernel.org/patch/11664717/ which avoids some potential UAF issues with the original patch.) v2: Remove now obsolete comment, use list_move_tail() and list_del_init() Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Fixes: d3c6dd1fb30d ("dma-buf/sw_sync: Synchronize signal vs syncpt free") Signed-off-by: Rob Clark <robdclark@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230818145939.39697-1-robdclark@gmail.com Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions