Re: [PATCH 0/2] i386: Fix two more NMI watchdog bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 8 Jun 2007 22:49:11 +0200
"Udo A. Steinberg" <[email protected]> wrote:

> On Fri, 8 Jun 2007 22:43:25 +0200 Ingo Molnar (IM) wrote:
> 
> IM> 
> IM> * Bj?rn Steinbrink <[email protected]> wrote:
> IM> 
> IM> > Anyway, both are bugs and should be fixed. Maybe we're even lucky and 
> IM> > it fixes your hang. *fingers crossed*
> IM> 
> IM> just to make it clear: the NMI watchdog was working perfectly fine on 
> IM> that box (in v2.6.21 and in dozens of kernel releases before that, for 
> IM> multiple years) before Andi's cleanup patch. So lets find that bug first 
> IM> or revert the cleanups.
> IM> 
> IM> 	Ingo
> 
> None of the patches posted by Bj__rn fix the kernel BUG at
> arch/i386/kernel/cpu/perfctr-watchdog.c:126! that occurs when doing
> echo 0 > /proc/sys/kernel/nmi_watchdog
> 
> Call Trace:
>  [<c010c429>] single_msr_unreserve+0xd/0x1a
>  [<c010c668>] disable_lapic_nmi_watchdog+0x27/0x35
>  [<c0110ac6>] proc_nmi_enabled+0xa0/0xbd
>  [<c018550c>] proc_sys_write+0x6f/0x8c
>  [<c018549d>] proc_sys_write+0x0/0x8c
>  [<c0156e5b>] vfs_write+0x8a/0x10c
>  [<c0157317>] sys_write+0x41/0x67
>  [<c0103c30>] syscall_call+0x7/0xb
> 
> Andi, did you have a patch for that?
> 

This?


From: Bjorn Steinbrink <[email protected]>

Fix oops triggered during: echo 0 > /proc/sys/kernel/nmi_watchdog

The culprit seems to be 09198e68501a7e34737cd9264d266f42429abcdc:
[PATCH] i386: Clean up NMI watchdog code

In two places, the parameters to release_{evntsel,perfctr}_nmi
got interchanged during the cleanup.

Fix interchanged parameters to release_{evntsel,perfctr}_nmi.

Signed-off-by: Bjorn Steinbrink <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Michal Piotrowski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 arch/i386/kernel/cpu/perfctr-watchdog.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff -puN arch/i386/kernel/cpu/perfctr-watchdog.c~fix-interchanged-parameters-to-release_evntselperfctr_nmi arch/i386/kernel/cpu/perfctr-watchdog.c
--- a/arch/i386/kernel/cpu/perfctr-watchdog.c~fix-interchanged-parameters-to-release_evntselperfctr_nmi
+++ a/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -276,8 +276,8 @@ static int single_msr_reserve(void)
 
 static void single_msr_unreserve(void)
 {
-	release_evntsel_nmi(wd_ops->perfctr);
-	release_perfctr_nmi(wd_ops->evntsel);
+	release_evntsel_nmi(wd_ops->evntsel);
+	release_perfctr_nmi(wd_ops->perfctr);
 }
 
 static void single_msr_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz)
@@ -475,10 +475,10 @@ static void p4_unreserve(void)
 {
 #ifdef CONFIG_SMP
 	if (smp_num_siblings > 1)
-		release_evntsel_nmi(MSR_P4_IQ_PERFCTR1);
+		release_perfctr_nmi(MSR_P4_IQ_PERFCTR1);
 #endif
-	release_evntsel_nmi(MSR_P4_IQ_PERFCTR0);
-	release_perfctr_nmi(MSR_P4_CRU_ESCR0);
+	release_evntsel_nmi(MSR_P4_CRU_ESCR0);
+	release_perfctr_nmi(MSR_P4_IQ_PERFCTR0);
 }
 
 static void p4_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz)
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux