* [net-next] net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse.
@ 2012-07-23 17:52 Saurabh
2012-07-23 20:09 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Saurabh @ 2012-07-23 17:52 UTC (permalink / raw)
To: netdev
With CONFIG_SPARSE_RCU_POINTER=y sparse identified references which did not
specificy __rcu in ip_vti.c
Signed-off-by: Saurabh Mohan <saurabh.mohan@vyatta.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
---
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index c41b5c3..3511ffb 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -55,7 +55,7 @@ struct vti_net {
struct ip_tunnel __rcu *tunnels_r[HASH_SIZE];
struct ip_tunnel __rcu *tunnels_l[HASH_SIZE];
struct ip_tunnel __rcu *tunnels_wc[1];
- struct ip_tunnel **tunnels[4];
+ struct ip_tunnel __rcu **tunnels[4];
struct net_device *fb_tunnel_dev;
};
@@ -160,8 +160,8 @@ static struct ip_tunnel *vti_tunnel_lookup(struct net *net,
return NULL;
}
-static struct ip_tunnel **__vti_bucket(struct vti_net *ipn,
- struct ip_tunnel_parm *parms)
+static struct ip_tunnel __rcu **__vti_bucket(struct vti_net *ipn,
+ struct ip_tunnel_parm *parms)
{
__be32 remote = parms->iph.daddr;
__be32 local = parms->iph.saddr;
@@ -179,8 +179,8 @@ static struct ip_tunnel **__vti_bucket(struct vti_net *ipn,
return &ipn->tunnels[prio][h];
}
-static inline struct ip_tunnel **vti_bucket(struct vti_net *ipn,
- struct ip_tunnel *t)
+static inline struct ip_tunnel __rcu **vti_bucket(struct vti_net *ipn,
+ struct ip_tunnel *t)
{
return __vti_bucket(ipn, &t->parms);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-23 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 17:52 [net-next] net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse Saurabh
2012-07-23 20:09 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox