[lkml]   [2007]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][PATCH 2/6] lockdep: validate rcu_dereference() vs rcu_read_lock()
On Wed, 19 Sep 2007 10:17:25 -0400 "Dmitry Torokhov"
<> wrote:

> Hi Peter,
> On 9/19/07, Peter Zijlstra <> wrote:
> > Warn when rcu_dereference() is not used in combination with rcu_read_lock()
> >
> According to Paul it is fine to use RCU primitives (when accompanied
> with proper comments) when the read-size critical section is guarded
> by spin_lock_irqsave()/spin_lock_irqsrestore() instead of
> rcu_read_lock()/rcu_read_unlock() and writers synchronize with
> synchronize_sched(), not synchronize_rcu(). Your patch will trigger
> warnign on such valid usages.

Sounds fragile to begin with. But you're right in that that is valid
for Linux as you know it. However in -rt most/all spinlocks are
converted to sleeping locks. In that case sync_sched() is not enough.

So I'd rather recommend against proliferation of such schemes, as we'd
have to clean them up later on.

Still, I'm sure there are other false positives and we need to come up
with proper annotations for those.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-09-19 16:33    [W:0.084 / U:6.664 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site