summaryrefslogtreecommitdiff
path: root/xkb/xkbUtils.c
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2023-03-10 12:39:30 +0100
committerMichel Dänzer <michel@daenzer.net>2023-03-27 08:19:31 +0000
commit754d6b6dd0a9ec42d75247596a8885bf54352ee7 (patch)
tree9176de8b1c855380712c4a24e0c39cad980d40ab /xkb/xkbUtils.c
parent4d1cd7cdc22013ed8de17d3218b9790b7027e1fe (diff)
downloadxserver-754d6b6dd0a9ec42d75247596a8885bf54352ee7.tar.gz
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
Diffstat (limited to 'xkb/xkbUtils.c')
0 files changed, 0 insertions, 0 deletions