Re: [PATCH] tracing: add trace_event_read_lock()

From: Lai Jiangshan
Date: Tue May 19 2009 - 01:19:05 EST


Paul E. McKenney wrote:
> On Mon, May 18, 2009 at 03:59:31PM +0200, Frederic Weisbecker wrote:
>> On Mon, May 18, 2009 at 07:35:34PM +0800, Lai Jiangshan wrote:
>>> I found that there is nothing to protect event_hash in
>>> ftrace_find_event().
>> Actually, rcu protects it, but not enough. We have neither
>> synchronize_rcu() nor rcu_read_lock.
>>
>> So we protect against concurrent hlist accesses.
>> But the event can be removed when a module is unloaded,
>> and that can happen between the time we get the event output
>> callback and the time we actually use it.
>
> I will ask the stupid question... Would invoking rcu_barrier() in the
> module-exit function take care of this? The rcu_barrier() primitive
> waits for all in-flight RCU callbacks to complete execution.
>
> Thanx, Paul
>

We have no call_rcu* in it.

Thanx, Lai

--
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/