Message ID | 20190312005930.9043-6-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
Series | [PULL,1/7] hostmem-file: reject invalid pmem file sizes | expand |
diff --git a/util/memfd.c b/util/memfd.c index 8debd0d037..d74ce4d793 100644 --- a/util/memfd.c +++ b/util/memfd.c @@ -188,7 +188,7 @@ bool qemu_memfd_alloc_check(void) bool qemu_memfd_check(unsigned int flags) { #ifdef CONFIG_LINUX - int mfd = memfd_create("test", flags); + int mfd = memfd_create("test", flags | MFD_CLOEXEC); if (mfd >= 0) { close(mfd);