svn commit: r352870 - head/lib/libc/sys
Kyle Evans
kevans at FreeBSD.org
Sun Sep 29 17:30:10 UTC 2019
Author: kevans
Date: Sun Sep 29 17:30:10 2019
New Revision: 352870
URL: https://svnweb.freebsd.org/changeset/base/352870
Log:
memfd_create(3): Don't actually force hugetlb size with MFD_HUGETLB
The size flags are only required to select a size on systems that support
multiple sizes. MFD_HUGETLB by itself is valid.
Modified:
head/lib/libc/sys/shm_open.c
Modified: head/lib/libc/sys/shm_open.c
==============================================================================
--- head/lib/libc/sys/shm_open.c Sun Sep 29 15:17:58 2019 (r352869)
+++ head/lib/libc/sys/shm_open.c Sun Sep 29 17:30:10 2019 (r352870)
@@ -88,9 +88,6 @@ memfd_create(const char *name, unsigned int flags)
if ((flags & ~(MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_HUGETLB |
MFD_HUGE_MASK)) != 0)
return (EINVAL);
- /* HUGETLB set with no size specified. */
- if ((flags & MFD_HUGETLB) != 0 && (flags & MFD_HUGE_MASK) == 0)
- return (EINVAL);
/* Size specified but no HUGETLB. */
if ((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0)
return (EINVAL);
More information about the svn-src-head
mailing list