lkml.org 
[lkml]   [2013]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] rcu: fix a race in hlist_nulls_for_each_entry_rcu macro
From
Date
On Tue, 2013-05-21 at 05:09 -0700, Paul E. McKenney wrote:
> >
> > -#define hlist_nulls_first_rcu(head) \
> > - (*((struct hlist_nulls_node __rcu __force **)&(head)->first))
> > +#define hlist_nulls_first_rcu(head) \
> > + (*((struct hlist_nulls_node __rcu __force **) \
> > + &((volatile typeof(*head) *)head)->first))
>
> Why not use ACCESS_ONCE() or (better) rcu_dereference_raw() here?
>

+1

Very good catch Roman !

Thanks !




\
 
 \ /
  Last update: 2013-05-21 16:21    [W:0.246 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site