Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 008440e3 authored by Jarek Poplawski's avatar Jarek Poplawski Committed by David S. Miller
Browse files

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: default avatarPawel Staszewski <pstaszewski@itcare.pl>
Tested-by: default avatarPawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01e53298
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;