diff options
Diffstat (limited to 'meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch')
-rw-r--r-- | meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch b/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch new file mode 100644 index 0000000000..77624ce151 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 74c26943f1228870022d116a1fda25be3a55a38e Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org> | ||
3 | Date: Wed, 18 Jun 2014 20:51:00 -0400 | ||
4 | Subject: [PATCH] Add missing O_CLOEXEC in kmod_module_get_size() | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
8 | --- | ||
9 | libkmod/libkmod-module.c | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c | ||
13 | index e3cc5a7..b81b451 100644 | ||
14 | --- a/libkmod/libkmod-module.c | ||
15 | +++ b/libkmod/libkmod-module.c | ||
16 | @@ -1783,7 +1783,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) | ||
17 | * loaded. | ||
18 | */ | ||
19 | snprintf(line, sizeof(line), "/sys/module/%s", mod->name); | ||
20 | - dfd = open(line, O_RDONLY); | ||
21 | + dfd = open(line, O_RDONLY|O_CLOEXEC); | ||
22 | if (dfd < 0) | ||
23 | return -errno; | ||
24 | |||
25 | -- | ||
26 | 1.8.3.1 | ||
27 | |||