Thread (3 messages) 3 messages, 2 authors, 2014-06-19

[PATCH] RESEND: add missing O_CLOEXEC in kmod_module_get_size()

flat view
STALE4494d

From: Cristian Rodríguez <hidden>
Date: 2014-06-19 00:51:35
Subsystem: the rest · Maintainer: Linus Torvalds

---
 libkmod/libkmod-module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index 1d90f34..8046262 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -1781,7 +1781,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod)
 	 * loaded.
 	 */
 	snprintf(line, sizeof(line), "/sys/module/%s", mod->name);
-	dfd = open(line, O_RDONLY);
+	dfd = open(line, O_RDONLY|O_CLOEXEC);
 	if (dfd < 0)
 		return -errno;
 
-- 
1.8.4.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help