aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas De Marchi2013-04-30 17:28:07 -0500
committerLinus Torvalds2013-04-30 19:04:06 -0500
commit907ed1328d2a748f3d6028503d3e04c74ea62730 (patch)
treee91582c2932917736319430f501ee5a9b9f4a0a7 /init/do_mounts_initrd.c
parentfb96c475f6b27bd2c7f6fe0720e6972909a203ca (diff)
downloadkernel-907ed1328d2a748f3d6028503d3e04c74ea62730.tar.gz
kernel-907ed1328d2a748f3d6028503d3e04c74ea62730.tar.xz
kernel-907ed1328d2a748f3d6028503d3e04c74ea62730.zip
usermodehelper: split remaining calls to call_usermodehelper_fns()
These are the only users of call_usermodehelper_fns(). This function suffers from not being able to determine if the cleanup is called. Even if in this places the cleanup pointer is NULL, convert them to use the separate call_usermodehelper_setup() + call_usermodehelper_exec() functions so we can remove the _fns variant. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Oleg Nesterov <oleg@redhat.com> Cc: David Howells <dhowells@redhat.com> Cc: James Morris <james.l.morris@oracle.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Tejun Heo <tj@kernel.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/do_mounts_initrd.c')
-rw-r--r--init/do_mounts_initrd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index a32ec1ce882b..3e0878e8a80d 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -50,6 +50,7 @@ static int init_linuxrc(struct subprocess_info *info, struct cred *new)
50 50
51static void __init handle_initrd(void) 51static void __init handle_initrd(void)
52{ 52{
53 struct subprocess_info *info;
53 static char *argv[] = { "linuxrc", NULL, }; 54 static char *argv[] = { "linuxrc", NULL, };
54 extern char *envp_init[]; 55 extern char *envp_init[];
55 int error; 56 int error;
@@ -70,8 +71,11 @@ static void __init handle_initrd(void)
70 */ 71 */
71 current->flags |= PF_FREEZER_SKIP; 72 current->flags |= PF_FREEZER_SKIP;
72 73
73 call_usermodehelper_fns("/linuxrc", argv, envp_init, UMH_WAIT_PROC, 74 info = call_usermodehelper_setup("/linuxrc", argv, envp_init,
74 init_linuxrc, NULL, NULL); 75 GFP_KERNEL, init_linuxrc, NULL, NULL);
76 if (!info)
77 return;
78 call_usermodehelper_exec(info, UMH_WAIT_PROC);
75 79
76 current->flags &= ~PF_FREEZER_SKIP; 80 current->flags &= ~PF_FREEZER_SKIP;
77 81