Commit 350eaf79 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Linus Torvalds

do_coredump(): check return from argv_split()

do_coredump() accesses helper_argv[0] without checking helper_argv !=
NULL.  This can happen if page allocation failed.
Signed-off-by: default avatarTetsuo Handa <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 26e5438e
......@@ -1770,6 +1770,11 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
if (ispipe) {
helper_argv = argv_split(GFP_KERNEL, corename+1, &helper_argc);
if (!helper_argv) {
printk(KERN_WARNING "%s failed to allocate memory\n",
goto fail_unlock;
/* Terminate the string before the first option */
delimit = strchr(corename, ' ');
if (delimit)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment