aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/coredump.c12
-rw-r--r--init/do_mounts_initrd.c8
2 files changed, 15 insertions, 5 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index 7dfb3b062e24..d52f6bd5ad8e 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -525,6 +525,7 @@ void do_coredump(siginfo_t *siginfo)
525 if (ispipe) { 525 if (ispipe) {
526 int dump_count; 526 int dump_count;
527 char **helper_argv; 527 char **helper_argv;
528 struct subprocess_info *sub_info;
528 529
529 if (ispipe < 0) { 530 if (ispipe < 0) {
530 printk(KERN_WARNING "format_corename failed\n"); 531 printk(KERN_WARNING "format_corename failed\n");
@@ -571,9 +572,14 @@ void do_coredump(siginfo_t *siginfo)
571 goto fail_dropcount; 572 goto fail_dropcount;
572 } 573 }
573 574
574 retval = call_usermodehelper_fns(helper_argv[0], helper_argv, 575 retval = -ENOMEM;
575 NULL, UMH_WAIT_EXEC, umh_pipe_setup, 576 sub_info = call_usermodehelper_setup(helper_argv[0],
576 NULL, &cprm); 577 helper_argv, NULL, GFP_KERNEL,
578 umh_pipe_setup, NULL, &cprm);
579 if (sub_info)
580 retval = call_usermodehelper_exec(sub_info,
581 UMH_WAIT_EXEC);
582
577 argv_free(helper_argv); 583 argv_free(helper_argv);
578 if (retval) { 584 if (retval) {
579 printk(KERN_INFO "Core dump to %s pipe failed\n", 585 printk(KERN_INFO "Core dump to %s pipe failed\n",
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