From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261984AbVGZRzD (ORCPT ); Tue, 26 Jul 2005 13:55:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261960AbVGZRxe (ORCPT ); Tue, 26 Jul 2005 13:53:34 -0400 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:36743 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S261974AbVGZRvo (ORCPT ); Tue, 26 Jul 2005 13:51:44 -0400 To: Andrew Morton Cc: Linus Torvalds , Subject: [PATCH 12/23] Update sysrq-B to use emergency_restart() References: From: ebiederm@xmission.com (Eric W. Biederman) Date: Tue, 26 Jul 2005 11:51:06 -0600 In-Reply-To: (Eric W. Biederman's message of "Tue, 26 Jul 2005 11:49:23 -0600") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org sysrq calls into the reboot path from an interrupt handler we can either push the code do into process context and call kernel_restart and get a clean reboot or we can simply reboot the machine, and increase our chances of actually rebooting. emergency_reboot() seems like the closest match to what we have previously done, and what we want. Signed-off-by: Eric W. Biederman --- drivers/char/sysrq.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) d7b573e957fb71b166223ee15ea97c93c14f5faa diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -115,7 +115,7 @@ static void sysrq_handle_reboot(int key, struct tty_struct *tty) { local_irq_enable(); - machine_restart(NULL); + emergency_restart(); } static struct sysrq_key_op sysrq_reboot_op = {