All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Al Viro <viro@ftp.linux.org.uk>
Subject: Re: [PATCH] Fix a panic when core_pattern is set to "| prog..."
Date: Mon, 16 Dec 2019 10:37:07 -0800	[thread overview]
Message-ID: <87r214unfw.fsf@linux.intel.com> (raw)
In-Reply-To: <2996767.y7E8ffpIOs@amur.mch.fsc.net> (Dietmar Hahn's message of "Mon, 16 Dec 2019 14:48:07 +0100")

Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> writes:

> Hi,
>
> if the /proc/sys/kernel/core_pattern is set with a space between '|' and the
> program and later a core file should be written the kernel panics.
> This happens because in format_corename() the first part of cn.corename
> is set to '\0' and later call_usermodehelper_exec() exits because of an
> empty command path but with return 0. But no pipe is created and thus
> cprm.file == NULL.
> This leads in file_start_write() to the panic because of dereferencing
> file_inode(file)->i_mode.

It would seem better to just skip the spaces and DTRT?

Of course doing the error check properly is a good idea anyways.

-Andi

  reply	other threads:[~2019-12-16 18:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 13:48 [PATCH] Fix a panic when core_pattern is set to "| prog..." Dietmar Hahn
2019-12-16 18:37 ` Andi Kleen [this message]
2019-12-17 12:56   ` Dietmar Hahn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r214unfw.fsf@linux.intel.com \
    --to=ak@linux.intel.com \
    --cc=dietmar.hahn@ts.fujitsu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.