Skip to content
Commit 66eeda94 authored by Erik Kurzinger's avatar Erik Kurzinger Committed by Greg Kroah-Hartman
Browse files

drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func

[ Upstream commit 2aa6f5b0 ]

During syncobj_eventfd_entry_func, dma_fence_chain_find_seqno may set
the fence to NULL if the given seqno is signaled and a later seqno has
already been submitted. In that case, the eventfd should be signaled
immediately which currently does not happen.

This is a similar issue to the one addressed by commit b19926d4


("drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.").

As a fix, if the return value of dma_fence_chain_find_seqno indicates
success but it sets the fence to NULL, we will assign a stub fence to
ensure the following code still signals the eventfd.

v1 -> v2: assign a stub fence instead of signaling the eventfd

Signed-off-by: default avatarErik Kurzinger <ekurzinger@nvidia.com>
Fixes: c7a47229

 ("drm/syncobj: add IOCTL to register an eventfd")
Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
Link: https://patchwork.freedesktop.org/patch/msgid/20240221184527.37667-1-ekurzinger@nvidia.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f06e5621
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment