XLibre Xserver
Go to file
Olivier Fourdan 4053782443 xwayland: Do not remove output on withdraw if leased
On DRM lease connector withdrawn event, Xwayland would free the
corresponding xwl_output offered for lease.

However, the pointer is still referenced from the rrLease->outputs[],
meaning that trying to clean up the RANDR DRM leases as done with commit
ef181265 (xwayland: Clean up drm lease when terminating) would cause a
use after free and random crashes.

To avoid that issue, on the connector withdraw event, set the connector
withdrawn flag but do not to remove (i.e. free) the xwayland output if
its is offered for lease.

Then, once the lease is terminated, check for the xwl_outputs with a
withdrawn connector and remove them (once we have no use for them
anymore.

Note that we cannot do that cleanup from xwl_randr_terminate_lease() as
removing the xwl_output will free the RRcrtc resources, which checks for
leases in XRANDR, and calls RRTerminateLease(), which chains back to
xwl_randr_terminate_lease().

v2: Use a "withdrawn_connector" flag to mark outputs to remove (Xaver)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
fixes: ef181265 - xwayland: Clean up drm lease when terminating

See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/946
See-also: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1130
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1482>
2024-04-30 09:13:34 +02:00
.gitlab-ci Update CI for Xwayland explicit sync 2024-04-09 06:11:03 +00:00
Xext include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
Xi include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
composite include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
config include: move dbus-core.h to config 2024-04-23 01:46:24 +00:00
damageext include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
dbe include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
dix include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
doc prevent name clash on Windows w/ RT_* defines 2024-04-15 18:59:23 -07:00
dri3 include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
exa include: drop obsolete check for typeof operator 2024-04-22 22:15:45 +00:00
fb render: move private definitions out of public glyphstr.h 2024-03-03 22:54:16 +00:00
glamor xwayland/glamor: Handle depth 15 in gbm_format_for_depth 2024-04-25 17:17:55 +02:00
glx include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
hw xwayland: Do not remove output on withdraw if leased 2024-04-30 09:13:34 +02:00
include include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
man Xserver.man: Note that -byteswappedclients is the default in this release 2024-03-23 10:27:03 -07:00
mi include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
miext os: unexport Os*() functions 2024-04-16 14:20:30 +02:00
os include: move private defs to dixstruct_priv.h 2024-04-30 00:47:38 +00:00
present rename remaining RT_* defines to X11_RESTYPE_* 2024-04-15 19:00:47 -07:00
pseudoramiX include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
randr include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
record include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
render include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
test include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
xfixes include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
xkb include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
.appveyor.yml appveyor: Add libxcvt build dep 2021-11-04 13:03:25 +00:00
.dir-locals.el .dir-locals.el: Add missing final newline 2019-10-01 17:05:28 +00:00
.gitignore Clean up the .gitignore file 2024-01-12 00:50:24 +00:00
.gitlab-ci.yml Update CI for Xwayland explicit sync 2024-04-09 06:11:03 +00:00
.mailmap Add a .mailmap file to canonicalize author names and emails 2023-03-15 18:10:51 +00:00
.travis.yml travis: Add OSX meson build to matrix 2019-05-02 15:42:58 +00:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
README.md Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
meson.build xwayland: add support for wp_linux_drm_syncobj_v1 2024-04-09 06:11:03 +00:00
meson_options.txt os: secure-rpc: make build option tristate 2024-04-17 23:38:25 +00:00
xorg-server.m4 xorg-server.m4: just all cflags instead of just sdkdir 2018-09-20 20:12:24 +01:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

X Server

The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into.

Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the following article: https://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the Xorg mailing list:

https://lists.freedesktop.org/mailman/listinfo/xorg

The primary development code repository can be found at:

https://gitlab.freedesktop.org/xorg/xserver

For patch submission instructions, see:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches

As with other projects hosted on freedesktop.org, X.Org follows its Code of Conduct, based on the Contributor Covenant. Please conduct yourself in a respectful and civilized manner when using the above mailing lists, bug trackers, etc:

https://www.freedesktop.org/wiki/CodeOfConduct