diff options
author | Ilya Maximets <i.maximets@samsung.com> | 2019-03-11 16:58:48 +0300 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2019-03-11 17:17:00 -0300 |
commit | 92db922f66cde45bb216c36eb43b762429c96a74 (patch) | |
tree | 59ca0aec4f97cd4da901f44e3c22020afd8a6007 /util | |
parent | 4a66c7a9996bb1bb1191170b172daa54e226d7ff (diff) |
memfd: always check for MFD_CLOEXEC
QEMU always sets this flag unconditionally. We need to
check if it's supported.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190311135850.6537-3-i.maximets@samsung.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/memfd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |