[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A124080.7010400@cn.fujitsu.com>
Date: Tue, 19 May 2009 13:15:44 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: paulmck@...ux.vnet.ibm.com
CC: Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing: add trace_event_read_lock()
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists