diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-10 22:16:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-10 00:33:02 +0900 |
commit | f77baf324713ef5d6ae9ae63a77aed2bfbe4333d (patch) | |
tree | ea8fd9421579024b5a49ae883fbf75dae21e3901 /net/ipv4 | |
parent | 166ab4d1f2a1fae8f2cbe43da0e35befadc1e90b (diff) | |
download | kernel_samsung_smdk4412-f77baf324713ef5d6ae9ae63a77aed2bfbe4333d.zip kernel_samsung_smdk4412-f77baf324713ef5d6ae9ae63a77aed2bfbe4333d.tar.gz kernel_samsung_smdk4412-f77baf324713ef5d6ae9ae63a77aed2bfbe4333d.tar.bz2 |
ipv4: Do not use dead fib_info entries.
[ Upstream commit dccd9ecc374462e5d6a5b8f8110415a86c2213d8 ]
Due to RCU lookups and RCU based release, fib_info objects can
be found during lookup which have fi->fib_dead set.
We must ignore these entries, otherwise we risk dereferencing
the parts of the entry which are being torn down.
Reported-by: Yevgen Pronenko <yevgen.pronenko@sonymobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_trie.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 58c25ea..0d884eb 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -1371,6 +1371,8 @@ static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l, if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos) continue; + if (fi->fib_dead) + continue; if (fa->fa_info->fib_scope < flp->flowi4_scope) continue; fib_alias_accessed(fa); |