Messages in this thread Patch in this message | | | Subject | Re: 2.6.34-rc2: cpu hotplug test failure on x86_64 | From | Peter Zijlstra <> | Date | Sat, 20 Mar 2010 18:29:09 +0100 |
| |
On Sat, 2010-03-20 at 22:47 +0530, Sachin Sant wrote: > Running cpu hotplug tests on a x86_64 box results in > the following BUG. > > BUG: unable to handle kernel NULL pointer dereference at 0000000000000004 > IP: [<ffffffff81037388>] amd_pmu_cpu_offline+0x38/0x67
I guess something like the below might work.
--- arch/x86/kernel/cpu/perf_event_amd.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index 358a8e3..0189af4 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c @@ -345,6 +345,8 @@ static void amd_pmu_cpu_offline(int cpu) return; cpuhw = &per_cpu(cpu_hw_events, cpu); + if (!cpuhw) + return; raw_spin_lock(&amd_nb_lock);
| |