diff options
author | Eric Dumazet <edumazet@google.com> | 2014-09-09 08:11:41 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-09 20:10:44 -0700 |
commit | 8e380f004e8e3c071590426a64210331051a4c42 (patch) | |
tree | 9db6225d48f70646900c1e5347371d7b747c9e6f /net/ipv4/ip_sockglue.c | |
parent | cbeddd5d163ba7a6cd96a96509f7043cce4f68d2 (diff) | |
download | linux-8e380f004e8e3c071590426a64210331051a4c42.tar.gz linux-8e380f004e8e3c071590426a64210331051a4c42.tar.bz2 linux-8e380f004e8e3c071590426a64210331051a4c42.zip |
ipv4: rcu cleanup in ip_ra_control()
Remove one sparse warning :
net/ipv4/ip_sockglue.c:328:22: warning: incorrect type in assignment (different address spaces)
net/ipv4/ip_sockglue.c:328:22: expected struct ip_ra_chain [noderef] <asn:4>*next
net/ipv4/ip_sockglue.c:328:22: got struct ip_ra_chain *[assigned] ra
And replace one rcu_assign_ptr() by RCU_INIT_POINTER() where applicable.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 455e75bcb167..c373a9ad4555 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -303,7 +303,7 @@ int ip_ra_control(struct sock *sk, unsigned char on, } /* dont let ip_call_ra_chain() use sk again */ ra->sk = NULL; - rcu_assign_pointer(*rap, ra->next); + RCU_INIT_POINTER(*rap, ra->next); spin_unlock_bh(&ip_ra_lock); if (ra->destructor) @@ -325,7 +325,7 @@ int ip_ra_control(struct sock *sk, unsigned char on, new_ra->sk = sk; new_ra->destructor = destructor; - new_ra->next = ra; + RCU_INIT_POINTER(new_ra->next, ra); rcu_assign_pointer(*rap, new_ra); sock_hold(sk); spin_unlock_bh(&ip_ra_lock); |