From acabfba18d676a06317e9c99520eb32d2f8185c1 Mon Sep 17 00:00:00 2001 From: Igor Maravic Date: Mon, 13 Aug 2012 10:26:08 +0200 Subject: [PATCH] --- yaml --- r: 327404 b: refs/heads/master c: ad5b310228da567e35a2ea5dcb2fd62e3a36654e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ipv4/fib_trie.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3c13979f8584..b1cb1c500ea7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 418a99ac6ad487dc9c42e6b0e85f941af56330f2 +refs/heads/master: ad5b310228da567e35a2ea5dcb2fd62e3a36654e diff --git a/trunk/net/ipv4/fib_trie.c b/trunk/net/ipv4/fib_trie.c index f84a0e90d675..4587d344046d 100644 --- a/trunk/net/ipv4/fib_trie.c +++ b/trunk/net/ipv4/fib_trie.c @@ -1656,7 +1656,12 @@ int fib_table_delete(struct fib_table *tb, struct fib_config *cfg) if (!l) return -ESRCH; - fa_head = get_fa_head(l, plen); + li = find_leaf_info(l, plen); + + if (!li) + return -ESRCH; + + fa_head = &li->falh; fa = fib_find_alias(fa_head, tos, 0); if (!fa) @@ -1692,9 +1697,6 @@ int fib_table_delete(struct fib_table *tb, struct fib_config *cfg) rtmsg_fib(RTM_DELROUTE, htonl(key), fa, plen, tb->tb_id, &cfg->fc_nlinfo, 0); - l = fib_find_node(t, key); - li = find_leaf_info(l, plen); - list_del_rcu(&fa->fa_list); if (!plen)