[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/7] memfd: always check for MFD_CLOEXEC
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 5/7] memfd: always check for MFD_CLOEXEC |
Date: |
Mon, 11 Mar 2019 21:59:28 -0300 |
From: Ilya Maximets <address@hidden>
QEMU always sets this flag unconditionally. We need to
check if it's supported.
Signed-off-by: Ilya Maximets <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
util/memfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.18.0.rc1.1.g3f1ff2140
- [Qemu-devel] [PULL 0/7] Machine queue, 2019-03-11, Eduardo Habkost, 2019/03/11
- [Qemu-devel] [PULL 7/7] memfd: improve error messages, Eduardo Habkost, 2019/03/11
- [Qemu-devel] [PULL 5/7] memfd: always check for MFD_CLOEXEC,
Eduardo Habkost <=
- [Qemu-devel] [PULL 6/7] memfd: set up correct errno if not supported, Eduardo Habkost, 2019/03/11
- [Qemu-devel] [PULL 4/7] hostmem-memfd: disable for systems without sealing support, Eduardo Habkost, 2019/03/11
- [Qemu-devel] [PULL 1/7] hostmem-file: reject invalid pmem file sizes, Eduardo Habkost, 2019/03/11
- [Qemu-devel] [PULL 3/7] machine: Move nvdimms state into struct MachineState, Eduardo Habkost, 2019/03/11
- [Qemu-devel] [PULL 2/7] nvdimm: Rename AcpiNVDIMMState into NVDIMMState, Eduardo Habkost, 2019/03/11
- Re: [Qemu-devel] [PULL 0/7] Machine queue, 2019-03-11, Peter Maydell, 2019/03/12