wayland/src
Jonas Ådahl 6fe12f02e3 client: Fix wl_display_roundtrip_queue() race condition
Without this commit, wl_display_roundtrip_queue() is vulnerable to a
race condition, causing the callback to be dispatched on the wrong
queue.

The race condition happens if some non-main thread calls
wl_display_roundtrip_queue() with its thread local queue, and the main
thread reads and dispatches the callback event from the
wl_display_sync() call before the thread local queue is set.

The issue is fixed by using a proxy wrapper, making the initialization
of the callback proxy atomic, effectively making it no longer possible
for some other thread to dispatch the proxy before the correct thread
local queue is set.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: check display_wrapper]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-29 16:03:33 +03:00
..
.gitignore ignore: Add *.dtd.embed 2016-03-10 22:24:20 -08:00
connection.c connection: remove redundant assignment 2016-04-23 11:38:20 +08:00
dtddata.S scanner: avoid executable stack 2016-03-02 12:05:28 +02:00
event-loop.c event-loop: remove extra header 2015-11-16 11:42:01 -08:00
scanner.c scanner: move include directives before extern "C" wrapper 2016-04-19 11:06:49 +03:00
scanner.mk Rename source subdir from wayland to src 2011-08-12 16:25:14 -04:00
wayland-client-core.h client: Introduce proxy wrappers 2016-04-29 15:58:23 +03:00
wayland-client-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-client.c client: Fix wl_display_roundtrip_queue() race condition 2016-04-29 16:03:33 +03:00
wayland-client.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-client.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-egl-core.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-egl.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-os.c src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-os.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-private.h server: Add an API to get the file descriptor for a client 2016-01-19 14:52:54 -08:00
wayland-scanner-uninstalled.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-scanner.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-server-core.h server: move include directives before extern "C" wrapper 2016-04-19 11:42:54 +03:00
wayland-server-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-server.c Revert "server: validate resource versions at creation time" 2016-02-18 18:23:05 -06:00
wayland-server.h src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
wayland-server.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-shm.c shm: Log a warning if a shm buffer address is requested when it may be invalid 2016-03-08 16:55:02 -08:00
wayland-util.c cosmetic: use tabs instead of spaces 2016-02-04 16:37:34 -08:00
wayland-util.h utils: move include directives before extern "C" wrapper 2016-04-19 11:46:49 +03:00
wayland-version.h.in src: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00