• Jarek Poplawski's avatar
    ipv4: Fix fib_trie rebalancing, part 2 · 7b85576d
    Jarek Poplawski authored
    My previous patch, which explicitly delays freeing of tnodes by adding
    them to the list to flush them after the update is finished, isn't
    strict enough. It treats exceptionally tnodes without parent, assuming
    they are newly created, so "invisible" for the read side yet.
    
    But the top tnode doesn't have parent as well, so we have to exclude
    all exceptions (at least until a better way is found). Additionally we
    need to move rcu assignment of this node before flushing, so the
    return type of the trie_rebalance() function is changed.
    Reported-by: default avatarYan Zheng <zheng.yan@oracle.com>
    Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7b85576d
fib_trie.c 61.7 KB