Eric Dumazet 54764bb647 ipv4: Restore old dst_free() behavior.
commit 404e0a8b6a55 (net: ipv4: fix RCU races on dst refcounts) tried
to solve a race but added a problem at device/fib dismantle time :

We really want to call dst_free() as soon as possible, even if sockets
still have dst in their cache.
dst_release() calls in free_fib_info_rcu() are not welcomed.

Root of the problem was that now we also cache output routes (in
nh_rth_output), we must use call_rcu() instead of call_rcu_bh() in
rt_free(), because output route lookups are done in process context.

Based on feedback and initial patch from David Miller (adding another
call_rcu_bh() call in fib, but it appears it was not the right fix)

I left the inet_sk_rx_dst_set() helper and added __rcu attributes
to nh_rth_output and nh_rth_input to better document what is going on in
this code.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-31 14:41:38 -07:00
..
2011-03-31 11:26:23 -03:00
2012-07-30 14:53:22 -07:00
2012-07-18 11:28:46 -07:00
2012-06-08 14:27:23 -07:00
2012-07-17 11:57:23 +02:00
2012-04-15 12:44:40 -04:00
2012-04-15 12:44:40 -04:00
2012-04-15 12:44:40 -04:00
2012-07-19 10:43:03 -07:00
2012-07-31 14:41:38 -07:00
2011-03-31 11:26:23 -03:00
2012-04-15 12:44:40 -04:00
2012-07-18 08:59:58 -07:00
2012-07-19 10:35:30 -07:00
2012-04-14 14:47:05 -04:00
2012-07-18 11:28:46 -07:00
2011-03-31 11:26:23 -03:00
2012-05-17 18:45:20 -04:00
2011-07-26 16:49:47 -07:00
2011-05-17 14:16:58 -04:00
2012-07-26 15:50:39 -07:00
2012-05-19 01:08:16 -04:00
2012-07-22 23:58:00 +04:00
2012-04-15 12:44:40 -04:00
2012-05-16 15:17:08 -04:00
2012-04-15 12:44:40 -04:00