LKML Archive on
 help / color / Atom feed
From: Konstantin Khlebnikov <>
To: Andrew Morton <>,
Cc: Jiri Kosina <>,
	Ulrich Obergfell <>,
	Aaron Tomlin <>
Subject: [PATCH] kernel/watchdog: use nmi registers snapshot in hardlockup handler
Date: Tue, 05 Jul 2016 14:20:47 +0300
Message-ID: <146771764784.86724.6006627197118544150.stgit@buzz> (raw)

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.

Signed-off-by: Konstantin Khlebnikov <>
Cc: Jiri Kosina <>
 kernel/watchdog.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 9acb29f280ec..6d1020c03d41 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -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)

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 11:20 Konstantin Khlebnikov [this message]
2016-07-07  8:30 ` Jiri Kosina
2016-07-08 21:02 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146771764784.86724.6006627197118544150.stgit@buzz \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone