If core_pattern is "" or "|", cn->corename is used uninitialized by
filp_open() or call_usermodehelper_exec().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Colin Walters <walters@verbum.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Cc: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
cn->corename = NULL;
if (expand_corename(cn, core_name_size))
return -ENOMEM;
+ cn->corename[0] = '\0';
if (ispipe)
++pat_ptr;