diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 012cf5a685814bdff7c538ccbdc8805519ed0939..00a54b246dfed11ae46b4782e25a13ea3c8c3e61 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;