kernel/watchdog: use nmi registers snapshot in hardlockup handler
PATCH 1/1 kernel/watchdog: use nmi registers snapshot in hardlockup handler
NMI handler doesn't call set_irq_regs(), so get_irq_regs() returns NULL or stale snapshot from beginning of IRQ interrupted by NMI. Registers from argument are always here and points to interrupted instruction and state.
--- kernel/watchdog.c | 1 - 1 file changed, 1 deletion(-)
kernel/watchdog.c +0 -1
@@ -344,7 +344,6 @@ static void watchdog_overflow_callback(struct perf_event *event,*/ if (is_hardlockup ()) {int this_cpu =smp_processor_id (); -struct pt_regs *regs =get_irq_regs ();/* only print hardlockups once */ if (__this_cpu_read (hard_watchdog_warn) == true)
Quoted 6 lines · Konstantin Khlebnikov
NMI handler doesn't call
set_irq_regs(), soget_irq_regs()returns NULL or stale snapshot from beginning of IRQ interrupted by NMI. Registers from argument are always here and points to interrupted instruction and state.Signed-off-by Konstantin Khlebnikov <[email protected]>Cc Jiri Kosina <[email protected]>
Good catch, thanks for fixing my thinko.
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 3 lines · On Tue, 05 Jul 2016 14:20:47 +0300 Konstantin Khlebnikov…
NMI handler doesn't call
set_irq_regs(), soget_irq_regs()returns NULL or stale snapshot from beginning of IRQ interrupted by NMI. Registers from argument are always here and points to interrupted instruction and state.
Changelog is quite poor. Please send along a new one which describes in full detail how this patch alters kernel behaviour.
Such a description will help others decide whether their kernel might need this patch and permits others to decide which kernel versions need the fix.