lkml.org 
[lkml]   [2008]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] X86: reboot-notify additions

* 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


\
 
 \ /
  Last update: 2008-06-20 17:47    [W:0.055 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site