Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package wayland for openSUSE:Factory checked 
in at 2022-01-13 00:22:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wayland (Old)
 and      /work/SRC/openSUSE:Factory/.wayland.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wayland"

Thu Jan 13 00:22:05 2022 rev:45 rq:945532 version:1.20.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/wayland/wayland.changes  2022-01-01 
10:45:11.871469878 +0100
+++ /work/SRC/openSUSE:Factory/.wayland.new.1892/wayland.changes        
2022-01-13 00:22:10.463921772 +0100
@@ -1,0 +2,27 @@
+Tue Jan 11 08:29:19 UTC 2022 - Alynx Zhou <alynx.z...@suse.com>
+
+- Add wayland-shm-Close-file-descriptors-not-needed.patch: For
+  platforms that support mremap(), we don't need to hold file
+  descriptors all the time, because programs like Xwayland will
+  hold a lot of file descriptors and may crash, this patch close
+  file descriptors earlier for those platforms (bsc#1194190).
+
+-------------------------------------------------------------------
+Mon Jan 10 18:09:27 UTC 2022 - Stefan Dirsch <sndir...@suse.com>
+
+- obsolete/provide libwayland-egl-devel 18.0.2 also on sle15-sp4
+
+-------------------------------------------------------------------
+Thu Dec  9 18:08:16 UTC 2021 - Jan Engelhardt <jeng...@inai.de>
+
+- Update to release 1.20
+  * A few protocol additions: wl_surface.offset allows clients to
+    update a surface's buffer offset independently from the
+    buffer, wl_output.name and description allow clients to
+    identify outputs without depending on xdg-output-unstable-v1.
+  * In protocol definitions, events have a new "type" attribute
+    and can now be marked as destructors.
+  * A number of bug fixes, including a race condition when
+    destroying proxies in multi-threaded clients.
+
+-------------------------------------------------------------------

Old:
----
  wayland-1.19.0.tar.xz
  wayland-1.19.0.tar.xz.sig

New:
----
  wayland-1.20.0.tar.xz
  wayland-1.20.0.tar.xz.sig
  wayland-shm-Close-file-descriptors-not-needed.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ wayland.spec ++++++
--- /var/tmp/diff_new_pack.mb2KD8/_old  2022-01-13 00:22:11.619922604 +0100
+++ /var/tmp/diff_new_pack.mb2KD8/_new  2022-01-13 00:22:11.627922610 +0100
@@ -15,7 +15,7 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-%define _version 1.19.0
+%define _version 1.20.0
 %if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1550
 %define eglversion 99~%_version
 %else
@@ -37,12 +37,13 @@
 Source2:        
http://wayland.freedesktop.org/releases/%name-%version.tar.xz.sig
 Source3:        %name.keyring
 Source4:        baselibs.conf
-
+# PATCH-FIX-UPSTREAM wayland-shm-Close-file-descriptors-not-needed.patch 
bsc#1194190 alynx.z...@suse.com -- Close file descriptors not needed to prevent 
Xwayland crash.
+Patch1:         wayland-shm-Close-file-descriptors-not-needed.patch
 BuildRequires:  c_compiler
 BuildRequires:  c++_compiler
-BuildRequires:  meson
 BuildRequires:  libxml2-tools
 BuildRequires:  libxslt-tools
+BuildRequires:  meson
 BuildRequires:  pkg-config
 BuildRequires:  xz
 BuildRequires:  pkgconfig(expat)
@@ -115,7 +116,7 @@
 Requires:       libwayland-egl1 = %eglversion
 Requires:       libwayland-server0 = %_version
 %if 0%{?suse_version} >= 1500
-%if 0%{?suse_version} >= 1550
+%if (0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400)
 Provides:       libwayland-egl-devel = 18.1.5
 Obsoletes:      libwayland-egl-devel < 18.1.5 
 %else

++++++ wayland-1.19.0.tar.xz -> wayland-1.20.0.tar.xz ++++++
++++ 59688 lines of diff (skipped)

++++++ wayland-shm-Close-file-descriptors-not-needed.patch ++++++
>From b20428663afa1a6351eb943b5f2992a744c18797 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofour...@redhat.com>
Date: Mon, 10 Jan 2022 15:10:07 +0100
Subject: [PATCH] shm: Close file descriptors not needed

Commit 5a981ee8 implemented a fallback path for platforms which do not
support mremap() such as FreeBSD.

To do so, the file descriptor for the mmap() is not closed immediately
but instead kept as long as the pool exists.

That induces more file descriptors kept open for longer, which in turn
may cause problems as wl_shm may be using a lot of file descriptors,
especially with Xwayland which can create a lot of pixmaps on behalf of
its X11 clients.

For platforms where mremap() is available, keeping those file
descriptors opened is a bit of a waste and may cause exhaustion of file
descriptors sooner that before commit 5a981ee8.

Only keep the mmap() file descriptor open on platforms which do not
implement mremap()  and close it immediately as before on others.

Signed-off-by: Olivier Fourdan <ofour...@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1283
---
 src/wayland-shm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/wayland-shm.c b/src/wayland-shm.c
index 63ac0d7d..17ab77f4 100644
--- a/src/wayland-shm.c
+++ b/src/wayland-shm.c
@@ -65,10 +65,12 @@ struct wl_shm_pool {
        char *data;
        ssize_t size;
        ssize_t new_size;
+#ifndef MREMAP_MAYMOVE
        /* The following three fields are needed for mremap() emulation. */
        int mmap_fd;
        int mmap_flags;
        int mmap_prot;
+#endif
        bool sigbus_is_impossible;
 };
 
@@ -153,7 +155,9 @@ shm_pool_unref(struct wl_shm_pool *pool, bool external)
                return;
 
        munmap(pool->data, pool->size);
+#ifndef MREMAP_MAYMOVE
        close(pool->mmap_fd);
+#endif
        free(pool);
 }
 
@@ -344,10 +348,14 @@ shm_create_pool(struct wl_client *client, struct 
wl_resource *resource,
                                       strerror(errno));
                goto err_free;
        }
+#ifndef MREMAP_MAYMOVE
        /* We may need to keep the fd, prot and flags to emulate mremap(). */
        pool->mmap_fd = fd;
        pool->mmap_prot = prot;
        pool->mmap_flags = flags;
+#else
+       close(fd);
+#endif
        pool->resource =
                wl_resource_create(client, &wl_shm_pool_interface, 1, id);
        if (!pool->resource) {
-- 
GitLab

Reply via email to