NR_CPUs can be quite big these days.  kmalloc the per CPU array instead of
putting it onto the stack
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
 
 static int __init check_nmi_watchdog (void)
 {
-       int counts[NR_CPUS];
+       int *counts;
        int cpu;
 
        if (nmi_watchdog == NMI_NONE)
                return -1; 
        }       
 
+       counts = kmalloc(NR_CPUS * sizeof(int),GFP_KERNEL);
+       if (!counts) {
+               nmi_watchdog = NMI_NONE;
+               return 0;
+       }
+
        printk(KERN_INFO "Testing NMI watchdog ... ");
 
        for (cpu = 0; cpu < NR_CPUS; cpu++)
                               cpu_pda[cpu].__nmi_count);
                        nmi_active = 0;
                        lapic_nmi_owner &= ~LAPIC_NMI_WATCHDOG;
+                       kfree(counts);
                        return -1;
                }
        }
        if (nmi_watchdog == NMI_LOCAL_APIC)
                nmi_hz = 1;
 
+       kfree(counts);
        return 0;
 }
 /* Have this called later during boot so counters are updating */