From 898b374af6f71041bd3bceebe257e564f3f1d458 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Wed, 26 May 2010 14:42:59 -0700 Subject: exec: replace call_usermodehelper_pipe with use of umh init function and resolve limit The first patch in this series introduced an init function to the call_usermodehelper api so that processes could be customized by caller. This patch takes advantage of that fact, by customizing the helper in do_coredump to create the pipe and set its core limit to one (for our recusrsion check). This lets us clean up the previous uglyness in the usermodehelper internals and factor call_usermodehelper out entirely. While I'm at it, we can also modify the helper setup to look for a core limit value of 1 rather than zero for our recursion check Signed-off-by: Neil Horman Reviewed-by: Oleg Nesterov Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/kmod.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include/linux/kmod.h') diff --git a/include/linux/kmod.h b/include/linux/kmod.h index f9edf63e90ea..5c058778ad35 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -62,7 +62,6 @@ struct subprocess_info { char **envp; enum umh_wait wait; int retval; - struct file *stdin; int (*init)(struct subprocess_info *info); void (*cleanup)(struct subprocess_info *info); void *data; @@ -75,8 +74,6 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, /* Set various pieces of state into the subprocess_info structure */ void call_usermodehelper_setkeys(struct subprocess_info *info, struct key *session_keyring); -int call_usermodehelper_stdinpipe(struct subprocess_info *sub_info, - struct file **filp); void call_usermodehelper_setfns(struct subprocess_info *info, int (*init)(struct subprocess_info *info), void (*cleanup)(struct subprocess_info *info), @@ -132,10 +129,6 @@ call_usermodehelper_keys(char *path, char **argv, char **envp, extern void usermodehelper_init(void); -struct file; -extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[], - struct file **filp); - extern int usermodehelper_disable(void); extern void usermodehelper_enable(void); -- cgit v1.2.3-58-ga151