Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755851AbYFSDD3 (ORCPT ); Wed, 18 Jun 2008 23:03:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751810AbYFSDDW (ORCPT ); Wed, 18 Jun 2008 23:03:22 -0400 Received: from smtp-out01.alice-dsl.net ([88.44.60.11]:16615 "EHLO smtp-out01.alice-dsl.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751000AbYFSDDV (ORCPT ); Wed, 18 Jun 2008 23:03:21 -0400 To: Cliff Wickman Cc: mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] X86: reboot-notify additions From: Andi Kleen References: Date: Thu, 19 Jun 2008 05:02:19 +0200 In-Reply-To: (Cliff Wickman's message of "Wed, 18 Jun 2008 17:03:35 -0500") Message-ID: <87mylib004.fsf@basil.nowhere.org> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 19 Jun 2008 02:55:04.0594 (UTC) FILETIME=[DFEA1720:01C8D1B7] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1241 Lines: 41 Cliff Wickman writes: > From: Cliff Wickman > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/