Messages in this thread | | | Date | Mon, 22 Sep 2008 12:25:24 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in preemptible code |
| |
* Andrea Righi <righi.andrea@gmail.com> wrote:
> Add local_irq_save() / local_irq_restore() before setting per cpu > variable switch_index, to avoid the following BUG:
that just papers over the bug:
> + 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.
Ingo
| |