From 8626dce8b091d60bfaae4fd6946c8a6a393faea8 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 16 Feb 2021 07:00:43 +0100 Subject: [PATCH] aio: safeguard O_CLOEXEC --- kernel/lib_mapfree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/lib_mapfree.c b/kernel/lib_mapfree.c index 3a32c953..5098e277 100644 --- a/kernel/lib_mapfree.c +++ b/kernel/lib_mapfree.c @@ -172,6 +172,7 @@ struct mapfree_info *mapfree_get(const char *name, int flags, int *error) struct list_head *tmp; unsigned int hash = mf_hash(name); + flags |= O_CLOEXEC; if (!(flags & O_DIRECT)) { down_read(&mf_table[hash].hash_mutex); for (tmp = mf_table[hash].hash_anchor.next;