* [PATCH net-next] ipv4: rcu cleanup in ip_ra_control()
@ 2014-09-09 15:11 Eric Dumazet
2014-09-10 3:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2014-09-09 15:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
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>
---
net/ipv4/ip_sockglue.c | 4 ++--
1 file 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv4: rcu cleanup in ip_ra_control()
2014-09-09 15:11 [PATCH net-next] ipv4: rcu cleanup in ip_ra_control() Eric Dumazet
@ 2014-09-10 3:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-09-10 3:15 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 09 Sep 2014 08:11:41 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-10 3:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-09 15:11 [PATCH net-next] ipv4: rcu cleanup in ip_ra_control() Eric Dumazet
2014-09-10 3:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).