diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2016-12-14 15:04:04 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-14 16:04:07 -0800 |
commit | 4d1f0fb096aedea7bb5489af93498a82e467c480 (patch) | |
tree | 3594461f9a790f7da4b8785f9cbf3e6b0f14d14d /ipc | |
parent | 40f7828b36e3b9dd2fdc34d065e342cddf8d7bef (diff) | |
download | talos-obmc-linux-4d1f0fb096aedea7bb5489af93498a82e467c480.tar.gz talos-obmc-linux-4d1f0fb096aedea7bb5489af93498a82e467c480.zip |
kernel/watchdog: use nmi registers snapshot in hardlockup handler
NMI handler doesn't call set_irq_regs(), it's set only by normal IRQ.
Thus get_irq_regs() returns NULL or stale registers snapshot with IP/SP
pointing to the code interrupted by IRQ which was interrupted by NMI.
NULL isn't a problem: in this case watchdog calls dump_stack() and
prints full stack trace including NMI. But if we're stuck in IRQ
handler then NMI watchlog will print stack trace without IRQ part at
all.
This patch uses registers snapshot passed into NMI handler as arguments:
these registers point exactly to the instruction interrupted by NMI.
Fixes: 55537871ef66 ("kernel/watchdog.c: perform all-CPU backtrace in case of hard lockup")
Link: http://lkml.kernel.org/r/146771764784.86724.6006627197118544150.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Ulrich Obergfell <uobergfe@redhat.com>
Cc: Aaron Tomlin <atomlin@redhat.com>
Cc: <stable@vger.kernel.org> [4.4+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions