aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kmod.h
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2010-05-26 17:42:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 12:12:44 -0400
commit898b374af6f71041bd3bceebe257e564f3f1d458 (patch)
treeb1be6fd3cca69becfc75787eab906338f363d3cd /include/linux/kmod.h
parenta06a4dc3a08201ff6a8a958f935b3cbf7744115f (diff)
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 <nhorman@tuxdriver.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kmod.h')
-rw-r--r--include/linux/kmod.h7
1 files changed, 0 insertions, 7 deletions
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 {
62 char **envp; 62 char **envp;
63 enum umh_wait wait; 63 enum umh_wait wait;
64 int retval; 64 int retval;
65 struct file *stdin;
66 int (*init)(struct subprocess_info *info); 65 int (*init)(struct subprocess_info *info);
67 void (*cleanup)(struct subprocess_info *info); 66 void (*cleanup)(struct subprocess_info *info);
68 void *data; 67 void *data;
@@ -75,8 +74,6 @@ struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
75/* Set various pieces of state into the subprocess_info structure */ 74/* Set various pieces of state into the subprocess_info structure */
76void call_usermodehelper_setkeys(struct subprocess_info *info, 75void call_usermodehelper_setkeys(struct subprocess_info *info,
77 struct key *session_keyring); 76 struct key *session_keyring);
78int call_usermodehelper_stdinpipe(struct subprocess_info *sub_info,
79 struct file **filp);
80void call_usermodehelper_setfns(struct subprocess_info *info, 77void call_usermodehelper_setfns(struct subprocess_info *info,
81 int (*init)(struct subprocess_info *info), 78 int (*init)(struct subprocess_info *info),
82 void (*cleanup)(struct subprocess_info *info), 79 void (*cleanup)(struct subprocess_info *info),
@@ -132,10 +129,6 @@ call_usermodehelper_keys(char *path, char **argv, char **envp,
132 129
133extern void usermodehelper_init(void); 130extern void usermodehelper_init(void);
134 131
135struct file;
136extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
137 struct file **filp);
138
139extern int usermodehelper_disable(void); 132extern int usermodehelper_disable(void);
140extern void usermodehelper_enable(void); 133extern void usermodehelper_enable(void);
141 134