[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080620154354.GA6656@elte.hu>
Date: Fri, 20 Jun 2008 17:43:54 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Cliff Wickman <cpw@....com>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>, andi@...stfloor.org,
tglx@...utronix.de, linux-kernel@...r.kernel.org,
the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [PATCH] X86: reboot-notify additions
* Cliff Wickman <cpw@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists