From: Ingo Molnar <mingo@elte.hu>
To: Cliff Wickman <cpw@sgi.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
andi@firstfloor.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org,
the arch/x86 maintainers <x86@kernel.org>
Subject: Re: [PATCH] X86: reboot-notify additions
Date: Fri, 20 Jun 2008 17:43:54 +0200 [thread overview]
Message-ID: <20080620154354.GA6656@elte.hu> (raw)
In-Reply-To: <20080620151650.GA5606@sgi.com>
* Cliff Wickman <cpw@sgi.com> wrote:
> --- linux.orig/kernel/sys.c
> +++ linux/kernel/sys.c
> @@ -267,9 +267,16 @@ out_unlock:
> * reboot the system. This is called when we know we are in
> * trouble so this is our best effort to reboot. This is
> * safe to call in interrupt context.
> + *
> + * The reboot_notifier_list uses a header for a blocking-form scan.
> + * Use a local header suitable for a non-blocking scan.
> */
> void emergency_restart(void)
> {
> + struct raw_notifier_head rh;
> +
> + rh.head = reboot_notifier_list.head;
> + raw_notifier_call_chain(&rh, SYS_EMERGENCY, NULL);
> machine_emergency_restart();
> }
that's still not a good idea - a blocking notifier list is that: a list
that has stuff which might block. emergency_restart() might get called
by non-blocking codepaths as well and it expects the restart to occur.
Ingo
next prev parent reply other threads:[~2008-06-20 15:44 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
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 [this message]
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=20080620154354.GA6656@elte.hu \
--to=mingo@elte.hu \
--cc=andi@firstfloor.org \
--cc=cpw@sgi.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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