Skip to content
Snippets Groups Projects
Verified Commit 017210f4 authored by Louis Chauvet's avatar Louis Chauvet
Browse files

drm/vkms: avoid race-condition between flushing and destroying


After we flush the workqueue at the commit tale, we need to make sure
that no work is queued until we destroy the state. Currently, new work
can be queued in the workqueue, even after the commit tale, as the
vblank thread is still running.

Therefore, to avoid a race-condition that will lead to the trigger of a
WARN_ON() at the function vkms_atomic_crtc_destroy_state(), add a mutex
to protect the sections where the queue is manipulated.

This way we can make sure that no work will be added to the workqueue
between flushing the queue (at the commit tail) and destroying the
state.

Signed-off-by: Maíra Canal's avatarMaíra Canal <mairacanal@riseup.net>
Signed-off-by: default avatarLouis Chauvet <louischauvet@bootlin.com>
parent aafc45d5
No related merge requests found
Pipeline #1304272 waiting for manual action
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment