Messages in this thread | | | Subject | Re: [PATCH] X86: reboot-notify additions | From | Andi Kleen <> | Date | Thu, 19 Jun 2008 05:02:19 +0200 |
| |
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
| |