lkml.org 
[lkml]   [2008]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] X86: reboot-notify additions
From
Date
Cliff Wickman <cpw@sgi.com> writes:

> From: Cliff Wickman <cpw@sgi.com>
>
> X86 reboot-notify additions.

Doesn't seem x86 specific to me.

> @@ -1068,6 +1071,8 @@ void crash_kexec(struct pt_regs *regs)
> if (!locked) {
> if (kexec_crash_image) {
> struct pt_regs fixed_regs;
> + blocking_notifier_call_chain(&reboot_notifier_list,
> + SYS_INSANE, NULL);

But you don't really want to block during a crash, do you?

> crash_setup_regs(&fixed_regs, regs);
> crash_save_vmcoreinfo();
> machine_crash_shutdown(&fixed_regs);
> Index: linux/kernel/sys.c
> ===================================================================
> --- linux.orig/kernel/sys.c
> +++ linux/kernel/sys.c
> @@ -270,6 +270,7 @@ out_unlock:
> */
> void emergency_restart(void)
> {
> + blocking_notifier_call_chain(&reboot_notifier_list, SYS_INSANE, NULL);

Here neither.

In fact taking any locks here is dangerous because if you crash holding
such a lock the system will deadlock on panic.

-Andi


\
 
 \ /
  Last update: 2008-06-19 05:05    [W:0.074 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site