xserver/hw
Michel Dänzer 468e2d90b4 xwayland: Prevent nested xwl_present_for_each_frame_callback calls
It could happen with the following call path:

frame_callback
 xwl_present_frame_callback
  xwl_present_msc_bump
   xwl_present_execute
    xwl_present_flip
     xwl_window_create_frame_callback

The nested loop called xwl_present_reset_timer, which may end up calling
xorg_list_del for the entry after the one frame_callback started the
chain for. This resulted in the outer loop never terminating, because
its next element wasn't hooked up to the list anymore.

We avoid this by calling xwl_present_reset_timer as needed in
frame_callback, and bailing from xwl_window_create_frame_callback if it
was called from the former.

We also catch nested calls and FatalError if they ever happen again due
to another bug.

v2:
* Leave xwl_present_reset_timer call in xwl_present_frame_callback,
  needed if xwl_present_msc_bump didn't hook up the window to the frame
  callback list again.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1442
(cherry picked from commit 754d6b6dd0)
2023-03-27 13:34:44 +02:00
..
vfb Don't install Xvfb 2023-02-17 10:13:34 +00:00
xwayland xwayland: Prevent nested xwl_present_for_each_frame_callback calls 2023-03-27 13:34:44 +02:00
meson.build Drop Xephyr / kdrive DDX 2023-02-17 10:13:34 +00:00