Re: __get_cpu_var() called from a preempt-unsafe context in__rcu_preempt_unboost() ?

From: Steven Rostedt
Date: Fri Jan 04 2008 - 08:48:58 EST



On Fri, 4 Jan 2008, Gautham R Shenoy wrote:
> |
> |--> rcu_trace_boost_unboost_called(RCU_BOOST_ME)
>
>
> where RCU_BOOST_ME is #defined as &__get_cpu_var(rcu_boost_data).
>
> Is calling __get_cpu_var() safe in this context, since we've already
> enabled the local interrupts and we're not in a preempt_disabled() ?

Probably not, but the worst that can happen is that we corrupt the trace
counter, and miss an increment. I'll see if I can fix that, but it should
be quite harmless wrt the stability of the system.

Thanks for pointing that out.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/