ipv6 flowlabel: add __rcu annotations
authorEric Dumazet <edumazet@google.com>
Thu, 7 Mar 2013 04:20:32 +0000 (04:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Mar 2013 21:33:10 +0000 (16:33 -0500)
Commit 18367681a10b (ipv6 flowlabel: Convert np->ipv6_fl_list to RCU.)
omitted proper __rcu annotations.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv6/ip6_flowlabel.c

index 64d12e77719afd26b95333a8a145b50301cef440..988c9f28f0fc86046e17055c4908fbe2f54b9277 100644 (file)
@@ -217,7 +217,7 @@ struct ipv6_txoptions {
 };
 
 struct ip6_flowlabel {
-       struct ip6_flowlabel    *next;
+       struct ip6_flowlabel __rcu *next;
        __be32                  label;
        atomic_t                users;
        struct in6_addr         dst;
@@ -238,9 +238,9 @@ struct ip6_flowlabel {
 #define IPV6_FLOWLABEL_MASK    cpu_to_be32(0x000FFFFF)
 
 struct ipv6_fl_socklist {
-       struct ipv6_fl_socklist *next;
-       struct ip6_flowlabel    *fl;
-       struct rcu_head         rcu;
+       struct ipv6_fl_socklist __rcu   *next;
+       struct ip6_flowlabel            *fl;
+       struct rcu_head                 rcu;
 };
 
 extern struct ip6_flowlabel    *fl6_sock_lookup(struct sock *sk, __be32 label);
index b973ed3d06cf6b3302190b59e69d46c30b1d2ae3..46e88433ec7d229550eecadc29f8eacc139fe5b2 100644 (file)
@@ -144,7 +144,9 @@ static void ip6_fl_gc(unsigned long dummy)
        spin_lock(&ip6_fl_lock);
 
        for (i=0; i<=FL_HASH_MASK; i++) {
-               struct ip6_flowlabel *fl, **flp;
+               struct ip6_flowlabel *fl;
+               struct ip6_flowlabel __rcu **flp;
+
                flp = &fl_ht[i];
                while ((fl = rcu_dereference_protected(*flp,
                                                       lockdep_is_held(&ip6_fl_lock))) != NULL) {
@@ -179,7 +181,9 @@ static void __net_exit ip6_fl_purge(struct net *net)
 
        spin_lock(&ip6_fl_lock);
        for (i = 0; i <= FL_HASH_MASK; i++) {
-               struct ip6_flowlabel *fl, **flp;
+               struct ip6_flowlabel *fl;
+               struct ip6_flowlabel __rcu **flp;
+
                flp = &fl_ht[i];
                while ((fl = rcu_dereference_protected(*flp,
                                                       lockdep_is_held(&ip6_fl_lock))) != NULL) {
@@ -506,7 +510,8 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
        struct ipv6_pinfo *np = inet6_sk(sk);
        struct in6_flowlabel_req freq;
        struct ipv6_fl_socklist *sfl1=NULL;
-       struct ipv6_fl_socklist *sfl, **sflp;
+       struct ipv6_fl_socklist *sfl;
+       struct ipv6_fl_socklist __rcu **sflp;
        struct ip6_flowlabel *fl, *fl1 = NULL;