[PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jarek Poplawski
Date: Monday, June 29, 2009 - 1:33 am

On 28-06-2009 23:36, Jarek Poplawski wrote:

David, IMHO this fix is needed in net-2.6 even if it doesn't fix the
problem reported by Pawel (there could be still something more).

Pawel, I see you decided to test my previous patch, but try to add
this one on top.

Thanks,
Jarek P.
------------------->
ipv4: Fix fib_trie rebalancing, part 3

Alas current delaying of freeing old tnodes by RCU in trie_rebalance
is still not enough because we can free a top tnode before updating a
t->trie pointer.

Reported-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---

 net/ipv4/fib_trie.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 012cf5a..00a54b2 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1021,6 +1021,9 @@ static void trie_rebalance(struct trie *t, struct tnode *tn)
 				      (struct node *)tn, wasfull);
 
 		tp = node_parent((struct node *) tn);
+		if (!tp)
+			rcu_assign_pointer(t->trie, (struct node *)tn);
+
 		tnode_free_flush();
 		if (!tp)
 			break;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Thu Jun 25, 8:48 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Thu Jun 25, 2:52 pm)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Fri Jun 26, 3:06 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Jorge Boncompte [DTI2], (Fri Jun 26, 3:26 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Fri Jun 26, 3:47 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paul E. McKenney, (Fri Jun 26, 10:05 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Fri Jun 26, 10:26 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paul E. McKenney, (Fri Jun 26, 11:21 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Sat Jun 27, 5:28 pm)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Sun Jun 28, 8:32 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Sun Jun 28, 8:48 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Mon Jun 29, 12:57 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Mon Jun 29, 1:08 am)
[PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_root. ..., Jarek Poplawski, (Mon Jun 29, 1:33 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Mon Jun 29, 1:47 am)
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits, Paweł Staszewski, (Mon Jun 29, 2:43 am)
Re: [PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_r ..., Paweł Staszewski, (Mon Jun 29, 2:51 am)
Re: [PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_r ..., Paweł Staszewski, (Mon Jun 29, 9:24 am)
Re: [PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_r ..., Paweł Staszewski, (Tue Jun 30, 1:16 pm)
Re: [PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_r ..., Paweł Staszewski, (Tue Jun 30, 4:31 pm)
Re: [PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_r ..., Paweł Staszewski, (Wed Jul 1, 10:43 pm)
Re: [PATCH net-2.6] Re: rib_trie / Fix inflate_threshold_r ..., Stephen Hemminger, (Fri Jul 10, 8:29 am)