From: Ingo Molnar <mingo@elte.hu>
To: Cliff Wickman <cpw@sgi.com>
Cc: andi@firstfloor.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org,
the arch/x86 maintainers <x86@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH] X86: reboot-notify additions
Date: Fri, 20 Jun 2008 13:45:24 +0200 [thread overview]
Message-ID: <20080620114524.GH7439@elte.hu> (raw)
In-Reply-To: <20080619145453.GA11929@sgi.com>
* Cliff Wickman <cpw@sgi.com> wrote:
> > > +#define SYS_INSANE 0x0004 /* Notify of system error/panic/oops */
> > > +/* For the SYS_INSANE case, no locks should be taken by the called-back
> > > + * function. The kernel is ready for an immediate reboot.
> > > + */
please use standard comment blocks, something like this:
/*
* Notify of system error/panic/oops
*
* No locks should be taken by the called-back function.
* The kernel is ready for an immediate reboot.
*/
#define SYS_INSANE 0x0004
> > > +++ linux/kernel/kexec.c
> > > @@ -1001,6 +1001,9 @@ asmlinkage long sys_kexec_load(unsigned
> > > if (result)
> > > goto out;
> > > }
> > > +
> > > + blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, NULL);
this puts an extra blocking call into a kexec critical path.
> struct pt_regs fixed_regs;
> + struct raw_notifier_head rh;
> + rh.head = reboot_notifier_list.head;
> + raw_notifier_call_chain(&rh, SYS_EMERGENCY, NULL);
that's very nasty. Now callbacks which put themselves on a blocking list
will be called without locking.
> void emergency_restart(void)
> {
> + struct raw_notifier_head rh;
> +
> + rh.head = reboot_notifier_list.head;
> + raw_notifier_call_chain(&rh, SYS_EMERGENCY, NULL);
ditto.
this patch is still far from being acceptable.
Ingo
prev parent reply other threads:[~2008-06-20 11:45 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
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 [this message]
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=20080620114524.GH7439@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 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.