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

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 <saurabh.mohan@vyatta.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Saurabh and committed by
David S. Miller
e7d4b18c 8fe5cb87

+5 -5
+5 -5
net/ipv4/ip_vti.c
··· 55 55 struct ip_tunnel __rcu *tunnels_r[HASH_SIZE]; 56 56 struct ip_tunnel __rcu *tunnels_l[HASH_SIZE]; 57 57 struct ip_tunnel __rcu *tunnels_wc[1]; 58 - struct ip_tunnel **tunnels[4]; 58 + struct ip_tunnel __rcu **tunnels[4]; 59 59 60 60 struct net_device *fb_tunnel_dev; 61 61 }; ··· 160 160 return NULL; 161 161 } 162 162 163 - static struct ip_tunnel **__vti_bucket(struct vti_net *ipn, 164 - struct ip_tunnel_parm *parms) 163 + static struct ip_tunnel __rcu **__vti_bucket(struct vti_net *ipn, 164 + struct ip_tunnel_parm *parms) 165 165 { 166 166 __be32 remote = parms->iph.daddr; 167 167 __be32 local = parms->iph.saddr; ··· 179 179 return &ipn->tunnels[prio][h]; 180 180 } 181 181 182 - static inline struct ip_tunnel **vti_bucket(struct vti_net *ipn, 183 - struct ip_tunnel *t) 182 + static inline struct ip_tunnel __rcu **vti_bucket(struct vti_net *ipn, 183 + struct ip_tunnel *t) 184 184 { 185 185 return __vti_bucket(ipn, &t->parms); 186 186 }