Messages in this thread | | | Date | Fri, 20 Jun 2008 17:43:54 +0200 | From | Ingo Molnar <> | Subject | Re: [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
| |