Skip to content
Commit 444d0ff3 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Simon Ser
Browse files

client: Lock display when setting a proxy event queue



Assignments to a wl_proxy's queue member are currently not synchronized
with potential reads of that member during event reading/queuing.
Assuming atomic pointer value reads and writes (which is a reasonable
assumption), and using the documented best practices to handle event
queue changes, a queue change should still be safe to perform.

That being said, such implicitly atomic accesses are difficult to assess
for correctness, especially since they do not introduce memory barriers.

To make the code more obviously correct, and handle any potential races
we are not currently aware of, this commit updates wl_proxy_set_queue()
to set the proxy's event queue under the display lock (all other
proxy queue accesses are already done under the display lock).

Signed-off-by: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
Suggested-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent a8246a9f
Loading
Loading
Loading
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