Date: Sun, 29 Sep 2019 17:30:10 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352870 - head/lib/libc/sys Message-ID: <201909291730.x8THUA3f006866@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909291730.x8THUA3f006866>