Jarek Poplawski e0f7cb8c8c ipv4: Fix fib_trie rebalancing
While doing trie_rebalance(): resize(), inflate(), halve() RCU free
tnodes before updating their parents. It depends on RCU delaying the
real destruction, but if RCU readers start after call_rcu() and before
parent update they could access freed memory.

It is currently prevented with preempt_disable() on the update side,
but it's not safe, except maybe classic RCU, plus it conflicts with
memory allocations with GFP_KERNEL flag used from these functions.

This patch explicitly delays freeing of tnodes by adding them to the
list, which is flushed after the update is finished.

Reported-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-15 02:31:29 -07:00
..
2009-05-25 01:53:53 -07:00
2009-04-20 02:14:59 -07:00
2009-01-04 17:29:21 -08:00
2009-06-03 02:51:04 -07:00
2009-06-03 02:51:04 -07:00
2009-05-29 22:12:32 -07:00
2009-05-25 01:53:53 -07:00
2009-06-15 02:31:29 -07:00
2009-06-14 03:16:13 -07:00
2009-04-23 06:37:16 -07:00
2009-04-22 00:49:51 -07:00
2009-06-03 02:51:04 -07:00
2009-03-31 23:00:26 -04:00