Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv6 flowlabel: add __rcu annotations

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>

authored by

Eric Dumazet and committed by
David S. Miller
7f0e44ac bf5e4dd6

+12 -7
+4 -4
include/net/ipv6.h
··· 217 217 }; 218 218 219 219 struct ip6_flowlabel { 220 - struct ip6_flowlabel *next; 220 + struct ip6_flowlabel __rcu *next; 221 221 __be32 label; 222 222 atomic_t users; 223 223 struct in6_addr dst; ··· 238 238 #define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF) 239 239 240 240 struct ipv6_fl_socklist { 241 - struct ipv6_fl_socklist *next; 242 - struct ip6_flowlabel *fl; 243 - struct rcu_head rcu; 241 + struct ipv6_fl_socklist __rcu *next; 242 + struct ip6_flowlabel *fl; 243 + struct rcu_head rcu; 244 244 }; 245 245 246 246 extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label);
+8 -3
net/ipv6/ip6_flowlabel.c
··· 144 144 spin_lock(&ip6_fl_lock); 145 145 146 146 for (i=0; i<=FL_HASH_MASK; i++) { 147 - struct ip6_flowlabel *fl, **flp; 147 + struct ip6_flowlabel *fl; 148 + struct ip6_flowlabel __rcu **flp; 149 + 148 150 flp = &fl_ht[i]; 149 151 while ((fl = rcu_dereference_protected(*flp, 150 152 lockdep_is_held(&ip6_fl_lock))) != NULL) { ··· 181 179 182 180 spin_lock(&ip6_fl_lock); 183 181 for (i = 0; i <= FL_HASH_MASK; i++) { 184 - struct ip6_flowlabel *fl, **flp; 182 + struct ip6_flowlabel *fl; 183 + struct ip6_flowlabel __rcu **flp; 184 + 185 185 flp = &fl_ht[i]; 186 186 while ((fl = rcu_dereference_protected(*flp, 187 187 lockdep_is_held(&ip6_fl_lock))) != NULL) { ··· 510 506 struct ipv6_pinfo *np = inet6_sk(sk); 511 507 struct in6_flowlabel_req freq; 512 508 struct ipv6_fl_socklist *sfl1=NULL; 513 - struct ipv6_fl_socklist *sfl, **sflp; 509 + struct ipv6_fl_socklist *sfl; 510 + struct ipv6_fl_socklist __rcu **sflp; 514 511 struct ip6_flowlabel *fl, *fl1 = NULL; 515 512 516 513