Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() inpreemptible code

From: Ingo Molnar
Date: Mon Sep 22 2008 - 06:29:17 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> > + local_irq_save(flags);
> > __get_cpu_var(switch_index) = 0;
> > + local_irq_restore(flags);
>
> either use __raw_get_cpu_var() if we are for sure not preemptible
> here, or fix the preemption status of this codepath.

i've applied the patch below instead to tip/oprofile - agreed?

Ingo

------------>