diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-10 22:16:32 -0400 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2012-07-03 11:29:02 -0400 |
commit | ebb99653d81d73bb9b07ade372c264cf3a089438 (patch) | |
tree | b8570f72a33b86dcf6c3e35d96f967712d192fcc /net | |
parent | 876b6e68a582dc659865da1aeeb298de2fbba7b2 (diff) |
ipv4: Do not use dead fib_info entries.
BugLink: http://bugs.launchpad.net/bugs/1013748
[ 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>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Diffstat (limited to 'net')
-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 58c25ea5a5c..0d884eb2b14 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, | |||
1371 | 1371 | ||
1372 | if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos) | 1372 | if (fa->fa_tos && fa->fa_tos != flp->flowi4_tos) |
1373 | continue; | 1373 | continue; |
1374 | if (fi->fib_dead) | ||
1375 | continue; | ||
1374 | if (fa->fa_info->fib_scope < flp->flowi4_scope) | 1376 | if (fa->fa_info->fib_scope < flp->flowi4_scope) |
1375 | continue; | 1377 | continue; |
1376 | fib_alias_accessed(fa); | 1378 | fib_alias_accessed(fa); |