Skip to content

Commit

Permalink
net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Saurabh authored and David S. Miller committed Jul 23, 2012
1 parent 8fe5cb8 commit e7d4b18
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions net/ipv4/ip_vti.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit e7d4b18

Please sign in to comment.