From e523dd9f0872de09c29c6c5fc4f3c60e5655d6a6 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 16 Nov 2023 14:39:35 -0500 Subject: [PATCH] allocators: shm: Remove future write sealing By sealing for future writes, we broke Wayland SHM support. It seems like the wayland library maps the SHM in read/write mode. This is visible through no display and an error message like this: wl_shm@7: error 2: failed mmap fd 43: Operation not permitted Part-of: --- .../gst-libs/gst/allocators/gstshmallocator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c b/subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c index 03ff40cba2..8abe02e21c 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/allocators/gstshmallocator.c @@ -151,9 +151,7 @@ gst_shm_allocator_alloc (GstAllocator * allocator, gsize size, gst_memory_unmap (mem, &info); #ifdef HAVE_MEMFD_CREATE - /* Now that it's kept mapped RW, seal it for any future mapping. This ensures - * that other processes receiving this memfd won't be able to modify it. */ - fcntl (fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_FUTURE_WRITE); + fcntl (fd, F_ADD_SEALS, F_SEAL_SHRINK); #endif return mem;