diff --git a/fs/coredump.c b/fs/coredump.c index d9b3ba086d92..6250eaf9b4d5 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -753,6 +753,14 @@ void do_coredump(const siginfo_t *siginfo) if (displaced) put_files_struct(displaced); if (!dump_interrupted()) { + /* + * umh disabled with CONFIG_STATIC_USERMODEHELPER_PATH="" would + * have this set to NULL. + */ + if (!cprm.file) { + pr_info("Core dump to |%s disabled\n", cn.corename); + goto close_fail; + } file_start_write(cprm.file); core_dumped = binfmt->core_dump(&cprm); file_end_write(cprm.file);