Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1136
b: refs/heads/master
c: ac6b931
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed May 17, 2005
1 parent ac8d529 commit 6987f11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7179906293ebdc333f14a03d3e58b03604848f3c
refs/heads/master: ac6b931c44fd9988eaa821c339d54ba06b212412
10 changes: 9 additions & 1 deletion trunk/arch/x86_64/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static __init int cpu_has_lapic(void)

static int __init check_nmi_watchdog (void)
{
int counts[NR_CPUS];
int *counts;
int cpu;

if (nmi_watchdog == NMI_NONE)
Expand All @@ -125,6 +125,12 @@ static int __init check_nmi_watchdog (void)
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++)
Expand All @@ -139,6 +145,7 @@ static int __init check_nmi_watchdog (void)
cpu_pda[cpu].__nmi_count);
nmi_active = 0;
lapic_nmi_owner &= ~LAPIC_NMI_WATCHDOG;
kfree(counts);
return -1;
}
}
Expand All @@ -149,6 +156,7 @@ static int __init check_nmi_watchdog (void)
if (nmi_watchdog == NMI_LOCAL_APIC)
nmi_hz = 1;

kfree(counts);
return 0;
}
/* Have this called later during boot so counters are updating */
Expand Down

0 comments on commit 6987f11

Please sign in to comment.