public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Cliff Wickman <cpw@sgi.com>
Cc: mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] X86: reboot-notify additions
Date: Thu, 19 Jun 2008 05:02:19 +0200	[thread overview]
Message-ID: <87mylib004.fsf@basil.nowhere.org> (raw)
In-Reply-To: <E1K95kd-00081i-B6@eag09.americas.sgi.com> (Cliff Wickman's message of "Wed, 18 Jun 2008 17:03:35 -0500")

Cliff Wickman <cpw@sgi.com> writes:

> From: Cliff Wickman <cpw@sgi.com>
>
> X86 reboot-notify additions.

Doesn't seem x86 specific to me.

> @@ -1068,6 +1071,8 @@ void crash_kexec(struct pt_regs *regs)
>  	if (!locked) {
>  		if (kexec_crash_image) {
>  			struct pt_regs fixed_regs;
> +			blocking_notifier_call_chain(&reboot_notifier_list,
> +				SYS_INSANE, NULL);

But you don't really want to block during a crash, do you?

>  			crash_setup_regs(&fixed_regs, regs);
>  			crash_save_vmcoreinfo();
>  			machine_crash_shutdown(&fixed_regs);
> Index: linux/kernel/sys.c
> ===================================================================
> --- linux.orig/kernel/sys.c
> +++ linux/kernel/sys.c
> @@ -270,6 +270,7 @@ out_unlock:
>   */
>  void emergency_restart(void)
>  {
> +	blocking_notifier_call_chain(&reboot_notifier_list, SYS_INSANE, NULL);

Here neither.

In fact taking any locks here is dangerous because if you crash holding
such a lock the system will deadlock on panic.

-Andi

  reply	other threads:[~2008-06-19  3:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 22:03 [PATCH] X86: reboot-notify additions Cliff Wickman
2008-06-19  3:02 ` Andi Kleen [this message]
2008-06-19 11:02 ` Ingo Molnar
2008-06-19 14:54   ` Cliff Wickman
2008-06-19 21:50     ` Eric W. Biederman
2008-06-20 15:16       ` Cliff Wickman
2008-06-20 15:43         ` Ingo Molnar
2008-06-20 18:01         ` Eric W. Biederman
2008-06-20 19:18           ` Cliff Wickman
2008-06-20 21:33             ` Eric W. Biederman
2008-06-20 11:45     ` Ingo Molnar

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=87mylib004.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=cpw@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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