lkml.org 
[lkml]   [2008]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-09-22 12:29    [W:0.051 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site