aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-09-10 17:23:30 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-09-10 17:23:30 +0000
commit944174e7bfbd3171f42a33e1ba6614ba19d29ad1 (patch)
tree0483978c768b278b04c4c6ce4f2ebe1ef42e17e9 /lib/libc/sys
parentb804b5bca1285be4f7c6822dd658db5a37f5ba93 (diff)
downloadsrc-944174e7bfbd3171f42a33e1ba6614ba19d29ad1.tar.gz
src-944174e7bfbd3171f42a33e1ba6614ba19d29ad1.zip
Fix memfd_create tests after r365524
r365524 did accidentally invert this check that sets SHM_LARGEPAGE, leading non-hugetlb memfd as unconfigured largepage shm and thus test failures when we try to ftruncate or write to them. PR: 249236 Discussed with: kib
Notes
Notes: svn path=/head/; revision=365593
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/shm_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/sys/shm_open.c b/lib/libc/sys/shm_open.c
index 223cee0952ca..d51139d86b79 100644
--- a/lib/libc/sys/shm_open.c
+++ b/lib/libc/sys/shm_open.c
@@ -136,7 +136,7 @@ memfd_create(const char *name, unsigned int flags)
oflags |= O_CLOEXEC;
if ((flags & MFD_ALLOW_SEALING) != 0)
shmflags |= SHM_ALLOW_SEALING;
- if ((flags & MFD_HUGETLB) == 0)
+ if ((flags & MFD_HUGETLB) != 0)
shmflags |= SHM_LARGEPAGE;
fd = __sys_shm_open2(SHM_ANON, oflags, 0, shmflags, memfd_name);
if (fd == -1 || (flags & MFD_HUGETLB) == 0)