Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934863AbZJJU42 (ORCPT ); Sat, 10 Oct 2009 16:56:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934838AbZJJU41 (ORCPT ); Sat, 10 Oct 2009 16:56:27 -0400 Received: from smtprelay11.ispgateway.de ([80.67.31.45]:49115 "EHLO smtprelay11.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934832AbZJJU41 (ORCPT ); Sat, 10 Oct 2009 16:56:27 -0400 From: Bernhard Walle To: akpm@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Bernhard Walle Subject: [PATCH 5/5] Always print panic message on current console Date: Sat, 10 Oct 2009 22:51:10 +0200 Message-Id: <1255207870-24496-6-git-send-email-bernhard@bwalle.de> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1255207870-24496-1-git-send-email-bernhard@bwalle.de> References: <1255207870-24496-1-git-send-email-bernhard@bwalle.de> X-Df-Sender: 1227806 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1254 Lines: 43 The kernel offers with TIOCL_GETKMSGREDIRECT ioctl() the possibility to redirect the kernel messages to a specific console. However, since it's not possible to switch to the kernel message console after a panic(), it would be nice if the kernel would print the panic message on the current console. Signed-off-by: Bernhard Walle --- kernel/panic.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/kernel/panic.c b/kernel/panic.c index 96b45d0..a230459 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -22,6 +22,7 @@ #include #include #include +#include int panic_on_oops; static unsigned long tainted_mask; @@ -65,6 +66,9 @@ NORET_TYPE void panic(const char * fmt, ...) */ preempt_disable(); + /* don't redirect the panic message to some hidden console */ + vt_set_kmsg_redirect(0); + bust_spinlocks(1); va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); -- 1.6.3.3 -- 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/