Home
last modified time | relevance | path

Searched hist:"592 fcb9dfafaa02dd0edc207bf5d3a0ee7a1f8df" (Results 1 – 2 of 2) sorted by relevance

/linux/net/ipv4/
H A Dip_sockglue.cdiff 592fcb9dfafaa02dd0edc207bf5d3a0ee7a1f8df Wed Jun 09 18:21:07 CEST 2010 Eric Dumazet <eric.dumazet@gmail.com> ip: ip_ra_control() rcu fix

commit 66018506e15b (ip: Router Alert RCU conversion) introduced RCU
lookups to ip_call_ra_chain(). It missed proper deinit phase :
When ip_ra_control() deletes an ip_ra_chain, it should make sure
ip_call_ra_chain() users can not start to use socket during the rcu
grace period. It should also delay the sock_put() after the grace
period, or we risk a premature socket freeing and corruptions, as
raw sockets are not rcu protected yet.

This delay avoids using expensive atomic_inc_not_zero() in
ip_call_ra_chain().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/linux/include/net/
H A Dip.hdiff 592fcb9dfafaa02dd0edc207bf5d3a0ee7a1f8df Wed Jun 09 18:21:07 CEST 2010 Eric Dumazet <eric.dumazet@gmail.com> ip: ip_ra_control() rcu fix

commit 66018506e15b (ip: Router Alert RCU conversion) introduced RCU
lookups to ip_call_ra_chain(). It missed proper deinit phase :
When ip_ra_control() deletes an ip_ra_chain, it should make sure
ip_call_ra_chain() users can not start to use socket during the rcu
grace period. It should also delay the sock_put() after the grace
period, or we risk a premature socket freeing and corruptions, as
raw sockets are not rcu protected yet.

This delay avoids using expensive atomic_inc_not_zero() in
ip_call_ra_chain().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>