From: ebiederm@xmission.com (Eric W. Biederman)
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: "akpm\@linux-foundation.org" <akpm@linux-foundation.org>,
"xiyou.wangcong\@gmail.com" <xiyou.wangcong@gmail.com>,
"paulmck\@linux.vnet.ibm.com" <paulmck@linux.vnet.ibm.com>,
"simon.kagstrom\@netinsight.net" <simon.kagstrom@netinsight.net>,
"kexec\@lists.infradead.org" <kexec@lists.infradead.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Satoru Moriya <satoru.moriya@hds.com>,
"dle-develop\@lists.sourceforge.net"
<dle-develop@lists.sourceforge.net>
Subject: Re: [PATCH] Fix kexec abort due to IPI from panic().
Date: Thu, 16 Sep 2010 16:13:38 -0700 [thread overview]
Message-ID: <m1wrql2sf1.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <5C4C569E8A4B9B42A84A977CF070A35B2C0979C90E@USINDEVS01.corp.hds.com> (Seiji Aguchi's message of "Thu, 16 Sep 2010 16:16:14 -0400")
Seiji Aguchi <seiji.aguchi@hds.com> writes:
> Hi,
>
> I'm Seiji Aguchi.
> I work for Hitachi Data Systems.
> It's a first time to send a patch to lkml.
> Nice to meet you.
>
> I found an issue in kexec.
> Please give me your comments and suggestions.
>
> Kexec abort when two cpus panic at the same time.
> An example scenario:
> 1. Two cpus panic at the same time .
> 2. One cpu ,cpu0, get kexec_mutex in crash_kexec().
> 3. The other cpu ,cpu1, can't get kexec_mutex and return from crash_kexec().
> 4. Cpu0 runs kmsg_dump(KMSG_DUMP_KEXEC).
> 5. Cpu1 can't get dump_list_lock and return from kmsg_dump(KMSG_DUMP_PANIC).
> 6. Cpu1 runs smp_send_stop() in panic() and sends IPI to other cpus.
> 7. Cpu0 may receive IPI from cpu1 while running kmsg_dump(KMSG_DUMP_KEXEC),
> crash_setup_regs(), or crash_save_vmcore().
>
> We can solve this issue by disabling external interrupt while getting kexec_mutex
> in crash_kexec().
Disabling interrupts is fine, I thought we did that already at some
point. However that call to kmsg_dump(KMSG_DUMP_KEXEC) is a bug as it
introduces locks into a path that should not be taking locks. Please
remove that broken kmsg_dump call as well.
Nothing in the crash_kexec path should even have the option of blocking.
Eric
next prev parent reply other threads:[~2010-09-16 23:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 20:16 [PATCH] Fix kexec abort due to IPI from panic() Seiji Aguchi
2010-09-16 23:13 ` Eric W. Biederman [this message]
2010-09-17 15:08 ` Seiji Aguchi
2010-09-24 13:08 ` [RFC][PATCH] " Seiji Aguchi
2010-09-27 16:59 ` Eric W. Biederman
2010-10-09 0:02 ` Seiji Aguchi
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=m1wrql2sf1.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=dle-develop@lists.sourceforge.net \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=satoru.moriya@hds.com \
--cc=seiji.aguchi@hds.com \
--cc=simon.kagstrom@netinsight.net \
--cc=xiyou.wangcong@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox