[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/4] memfd: always check for MFD_CLOEXEC
From: |
Ilya Maximets |
Subject: |
[Qemu-devel] [PATCH 2/4] memfd: always check for MFD_CLOEXEC |
Date: |
Tue, 27 Nov 2018 14:10:48 +0300 |
QEMU always sets this flag unconditionally. We need to
check if it's supported.
Signed-off-by: Ilya Maximets <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.17.1
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, (continued)
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Gerd Hoffmann, 2018/11/27
Message not available
Message not available
Message not available