mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5684>
This commit is contained in:
parent
2afe7cb97e
commit
e523dd9f08
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue