i386: fix NMI watchdog not reserving its MSRs
authorBjörn Steinbrink <B.Steinbrink@gmx.de>
Sat, 16 Jun 2007 17:15:55 +0000 (10:15 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 16 Jun 2007 20:16:15 +0000 (13:16 -0700)
At system boot time, the NMI watchdog no longer reserved its MSRs, allowing
other subsystems to mess with them.  Fix that.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/cpu/perfctr-watchdog.c

index 2b04c8f..8343244 100644 (file)
@@ -614,6 +614,12 @@ int lapic_watchdog_init(unsigned nmi_hz)
                probe_nmi_watchdog();
                if (!wd_ops)
                        return -1;
+
+               if (!wd_ops->reserve()) {
+                       printk(KERN_ERR
+                               "NMI watchdog: cannot reserve perfctrs\n");
+                       return -1;
+               }
        }
 
        if (!(wd_ops->setup(nmi_hz))) {