* [git pull] kgdb 2.6.27-rc8 fixes
@ 2008-10-06 19:14 Jason Wessel
2008-10-06 19:14 ` [PATCH 1/2] kgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI Jason Wessel
0 siblings, 1 reply; 3+ messages in thread
From: Jason Wessel @ 2008-10-06 19:14 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, kgdb-bugreport
Linus, please pull the kgdb git tree fixes for 2.6.27-rc8
git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git for_linus
Summary:
Testing the kgdb with kvm has found 2 problems:
- NMI code has a race where it can be invoked twice
- The softlockup watchdog must be touched when running
with CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1, else
the kernel executes a reboot if debugged for too long.
Short log follows:
---
Jan Kiszka (1):
kgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI
Jason Wessel (1):
kgdb: call touch_softlockup_watchdog on resume
arch/x86/kernel/kgdb.c | 7 +------
kernel/kgdb.c | 3 +++
2 files changed, 4 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] kgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI
2008-10-06 19:14 [git pull] kgdb 2.6.27-rc8 fixes Jason Wessel
@ 2008-10-06 19:14 ` Jason Wessel
2008-10-06 19:14 ` [PATCH 2/2] kgdb: call touch_softlockup_watchdog on resume Jason Wessel
0 siblings, 1 reply; 3+ messages in thread
From: Jason Wessel @ 2008-10-06 19:14 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, kgdb-bugreport
From: Jan Kiszka <jan.kiszka@siemens.com>
Stress-testing KVM's latest NMI support with kgdbts inside an SMP guest,
I came across spurious unhandled NMIs while running the singlestep test.
Looking closer at the code path each NMI takes when KGDB is enabled, I
noticed that kgdb_nmicallback is called twice per event: One time via
DIE_NMI_IPI notification, the second time on DIE_NMI. Removing the first
invocation cures the unhandled NMIs here.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
arch/x86/kernel/kgdb.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index 8282a21..10435a1 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -455,12 +455,7 @@ static int __kgdb_notify(struct die_args *args, unsigned long cmd)
return NOTIFY_DONE;
case DIE_NMI_IPI:
- if (atomic_read(&kgdb_active) != -1) {
- /* KGDB CPU roundup */
- kgdb_nmicallback(raw_smp_processor_id(), regs);
- was_in_debug_nmi[raw_smp_processor_id()] = 1;
- touch_nmi_watchdog();
- }
+ /* Just ignore, we will handle the roundup on DIE_NMI. */
return NOTIFY_DONE;
case DIE_NMIUNKNOWN:
--
1.6.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] kgdb: call touch_softlockup_watchdog on resume
2008-10-06 19:14 ` [PATCH 1/2] kgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI Jason Wessel
@ 2008-10-06 19:14 ` Jason Wessel
0 siblings, 0 replies; 3+ messages in thread
From: Jason Wessel @ 2008-10-06 19:14 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, kgdb-bugreport
The softlockup watchdog needs to be touched when resuming the from the
kgdb stopped state to avoid the printk that a CPU is stuck if the
debugger was active for longer than the softlockup threshold.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
kernel/kgdb.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index 25d955d..e4dcfb2 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -590,6 +590,7 @@ static void kgdb_wait(struct pt_regs *regs)
/* Signal the primary CPU that we are done: */
atomic_set(&cpu_in_kgdb[cpu], 0);
+ touch_softlockup_watchdog();
clocksource_touch_watchdog();
local_irq_restore(flags);
}
@@ -1432,6 +1433,7 @@ acquirelock:
atomic_read(&kgdb_cpu_doing_single_step) != cpu) {
atomic_set(&kgdb_active, -1);
+ touch_softlockup_watchdog();
clocksource_touch_watchdog();
local_irq_restore(flags);
@@ -1524,6 +1526,7 @@ acquirelock:
kgdb_restore:
/* Free kgdb_active */
atomic_set(&kgdb_active, -1);
+ touch_softlockup_watchdog();
clocksource_touch_watchdog();
local_irq_restore(flags);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-06 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-06 19:14 [git pull] kgdb 2.6.27-rc8 fixes Jason Wessel
2008-10-06 19:14 ` [PATCH 1/2] kgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI Jason Wessel
2008-10-06 19:14 ` [PATCH 2/2] kgdb: call touch_softlockup_watchdog on resume Jason Wessel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).