[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B7242@saturn3.aculab.com>
Date: Tue, 21 May 2013 14:42:34 +0100
From: "David Laight" <David.Laight@...LAB.COM>
To: "Roman Gushchin" <klamm@...dex-team.ru>
Cc: "Dipankar Sarma" <dipankar@...ibm.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
<zhmurov@...dex-team.ru>, <linux-kernel@...r.kernel.org>,
<netdev@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
"Eric Dumazet" <eric.dumazet@...il.com>,
"Alexey Kuznetsov" <kuznet@....inr.ac.ru>,
"James Morris" <jmorris@...ei.org>,
"Hideaki YOSHIFUJI" <yoshfuji@...ux-ipv6.org>,
"Patrick McHardy" <kaber@...sh.net>
Subject: RE: [PATCH] rcu: fix a race in hlist_nulls_for_each_entry_rcu macro
> >> -#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))
> >
> > I'd have thought it would be better to change hlist_nulls_first_rcu().
>
> It's exactly what I suggest. May be I miss something? Please, clarify.
Gah - chasing through too many defines in too many header files!
Actually making the 'head' structure have volatile pointers
might be better.
Possibly in struct hlist_nulls_node itself.
There are toooo many casts for sanity :-)
David
--
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