From: Saurabh Date: Mon, 23 Jul 2012 07:52:04 +0000 (+0000) Subject: net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7d4b18cbebc635fafd634688bbf66c59912879f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse. With CONFIG_SPARSE_RCU_POINTER=y sparse identified references which did not specificy __rcu in ip_vti.c Signed-off-by: Saurabh Mohan Reported-by: Fengguang Wu Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index c41b5c359936..3511ffba7bd4 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); }