diff options
-rw-r--r-- | include/net/ipv6.h | 8 | ||||
-rw-r--r-- | net/ipv6/ip6_flowlabel.c | 11 |
2 files changed, 12 insertions, 7 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 64d12e77719a..988c9f28f0fc 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -217,7 +217,7 @@ struct ipv6_txoptions { | |||
217 | }; | 217 | }; |
218 | 218 | ||
219 | struct ip6_flowlabel { | 219 | struct ip6_flowlabel { |
220 | struct ip6_flowlabel *next; | 220 | struct ip6_flowlabel __rcu *next; |
221 | __be32 label; | 221 | __be32 label; |
222 | atomic_t users; | 222 | atomic_t users; |
223 | struct in6_addr dst; | 223 | struct in6_addr dst; |
@@ -238,9 +238,9 @@ struct ip6_flowlabel { | |||
238 | #define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF) | 238 | #define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF) |
239 | 239 | ||
240 | struct ipv6_fl_socklist { | 240 | struct ipv6_fl_socklist { |
241 | struct ipv6_fl_socklist *next; | 241 | struct ipv6_fl_socklist __rcu *next; |
242 | struct ip6_flowlabel *fl; | 242 | struct ip6_flowlabel *fl; |
243 | struct rcu_head rcu; | 243 | struct rcu_head rcu; |
244 | }; | 244 | }; |
245 | 245 | ||
246 | extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); | 246 | extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index b973ed3d06cf..46e88433ec7d 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -144,7 +144,9 @@ static void ip6_fl_gc(unsigned long dummy) | |||
144 | spin_lock(&ip6_fl_lock); | 144 | spin_lock(&ip6_fl_lock); |
145 | 145 | ||
146 | for (i=0; i<=FL_HASH_MASK; i++) { | 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 | flp = &fl_ht[i]; | 150 | flp = &fl_ht[i]; |
149 | while ((fl = rcu_dereference_protected(*flp, | 151 | while ((fl = rcu_dereference_protected(*flp, |
150 | lockdep_is_held(&ip6_fl_lock))) != NULL) { | 152 | lockdep_is_held(&ip6_fl_lock))) != NULL) { |
@@ -179,7 +181,9 @@ static void __net_exit ip6_fl_purge(struct net *net) | |||
179 | 181 | ||
180 | spin_lock(&ip6_fl_lock); | 182 | spin_lock(&ip6_fl_lock); |
181 | for (i = 0; i <= FL_HASH_MASK; i++) { | 183 | for (i = 0; i <= FL_HASH_MASK; i++) { |
182 | struct ip6_flowlabel *fl, **flp; | 184 | struct ip6_flowlabel *fl; |
185 | struct ip6_flowlabel __rcu **flp; | ||
186 | |||
183 | flp = &fl_ht[i]; | 187 | flp = &fl_ht[i]; |
184 | while ((fl = rcu_dereference_protected(*flp, | 188 | while ((fl = rcu_dereference_protected(*flp, |
185 | lockdep_is_held(&ip6_fl_lock))) != NULL) { | 189 | lockdep_is_held(&ip6_fl_lock))) != NULL) { |
@@ -506,7 +510,8 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen) | |||
506 | struct ipv6_pinfo *np = inet6_sk(sk); | 510 | struct ipv6_pinfo *np = inet6_sk(sk); |
507 | struct in6_flowlabel_req freq; | 511 | struct in6_flowlabel_req freq; |
508 | struct ipv6_fl_socklist *sfl1=NULL; | 512 | struct ipv6_fl_socklist *sfl1=NULL; |
509 | struct ipv6_fl_socklist *sfl, **sflp; | 513 | struct ipv6_fl_socklist *sfl; |
514 | struct ipv6_fl_socklist __rcu **sflp; | ||
510 | struct ip6_flowlabel *fl, *fl1 = NULL; | 515 | struct ip6_flowlabel *fl, *fl1 = NULL; |
511 | 516 | ||
512 | 517 | ||