public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Fix HARD Lockup Firing off while in debugger
@ 2015-12-12 21:08 Jeff Merkey
  2015-12-12 21:19 ` Jeff Merkey
  2015-12-14 17:28 ` Don Zickus
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Merkey @ 2015-12-12 21:08 UTC (permalink / raw)
  To: LKML; +Cc: akpm, uobergfe, dzickus, atomlin, cmetcalf, fweisbec

The current touch_nmi_watchdog() function in /kernel/watchdog.c does
not always catch all cases when a processor is spinning in the nmi
handler inside either KGDB, KDB, or MDB.  The hrtimer_interrupts_saved
count can still end up matching the previous value in some cases,
resulting in the hard lockup detector tagging processors inside a
debugger and executing a panic.  The patch below corrects this
problem.  I did not add this to the touch_nmi_function directly
becuase of possible affects on timing issues.

I have tested this patch and it fixes the problem for kernel debuggers
stopping errant hard lockup events when processors are spinning inside
the debugger.


Signed-off-by:  Jeff V. Merkey <jeffmerkey@gmail.com>
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 18f34cf..b682aab 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -283,6 +283,13 @@ static bool is_hardlockup(void)
 	__this_cpu_write(hrtimer_interrupts_saved, hrint);
 	return false;
 }
+
+void touch_hardlockup_watchdog(void)
+{
+	__this_cpu_write(hrtimer_interrupts_saved, 0);
+}
+EXPORT_SYMBOL_GPL(touch_hardlockup_watchdog);
+
 #endif

 static int is_softlockup(unsigned long touch_ts)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-15  3:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-12 21:08 [PATCH 1/1] Fix HARD Lockup Firing off while in debugger Jeff Merkey
2015-12-12 21:19 ` Jeff Merkey
2015-12-14 17:28 ` Don Zickus
2015-12-15  2:59   ` Jeff Merkey
2015-12-15  3:18     ` Jeff Merkey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox