From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933284AbcCRPcG (ORCPT ); Fri, 18 Mar 2016 11:32:06 -0400 Received: from [198.137.202.9] ([198.137.202.9]:36849 "EHLO bombadil.infradead.org" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S933100AbcCRPcE (ORCPT ); Fri, 18 Mar 2016 11:32:04 -0400 Message-Id: <20160318153022.027826871@infradead.org> User-Agent: quilt/0.61-1 Date: Fri, 18 Mar 2016 16:28:03 +0100 From: Peter Zijlstra To: linux-kernel@vger.kernel.org Cc: rostedt@goodmis.org, dzickus@redhat.com, mingo@kernel.org, tglx@linutronix.de, peterz@infradead.org Subject: [PATCH 1/2] watchdog: Fix output References: <20160318152802.407611377@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-watchdog-fix-output.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pr_crap() functions generate idiotic output; use printk(). Broken output: [ 3538.718135] NMI watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [perf_fuzzer:2646] [ 3383.233583] NMI watchdog: Watchdog detected hard LOCKUP on cpu 27 Fixed output: [14180.328194] BUG: soft lockup - CPU#2 stuck for 23s! [perf_fuzzer:13650] [ 1064.914925] BUG: NMI Watchdog detected hard LOCKUP on cpu 11 Cc: Don Zickus Signed-off-by: Peter Zijlstra (Intel) --- kernel/watchdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -350,7 +350,7 @@ static void watchdog_overflow_callback(s if (__this_cpu_read(hard_watchdog_warn) == true) return; - pr_emerg("Watchdog detected hard LOCKUP on cpu %d", this_cpu); + printk(KERN_EMERG "BUG: NMI detected hard LOCKUP on cpu %d", this_cpu); print_modules(); print_irqtrace_events(current); if (regs) @@ -467,7 +467,7 @@ static enum hrtimer_restart watchdog_tim } } - pr_emerg("BUG: soft lockup - CPU#%d stuck for %us! [%s:%d]\n", + printk(KERN_EMERG "BUG: soft lockup - CPU#%d stuck for %us! [%s:%d]\n", smp_processor_id(), duration, current->comm, task_pid_nr(current)); __this_cpu_write(softlockup_task_ptr_saved, current);