Skip to content

Fix use after free on CRTC removal

Olivier Fourdan requested to merge ofourdan/xserver:bug108249 into master

I reckon https://bugs.freedesktop.org/show_bug.cgi?id=108249 ("[xwayland] Crash in Xpresent code on resume from suspend") is caused by the present code using a RRCrtcPtr previously freed by Xwayland.

Reason for this is because Xwayland's xwl_output_remove() will destroy the RRCrtcPtr for the Wayland outputs when removed, but if there is a flip pending, the xwl_present_sync_callback() will trigger after the CRTC is destroyed and not much good will come out of this.

Edited by Olivier Fourdan

Merge request reports