[lkml]   [2012]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[ 63/82] ipv4: Do not use dead fib_info entries.
    3.2-stable review patch.  If anyone has any objections, please let me know.


    From: "David S. Miller" <>

    [ 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 <>
    Signed-off-by: David S. Miller <>
    Signed-off-by: Ben Hutchings <>
    net/ipv4/fib_trie.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
    index 3ce23f9..cd2d639 100644
    --- a/net/ipv4/fib_trie.c
    +++ b/net/ipv4/fib_trie.c
    @@ -1372,6 +1372,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)
    + if (fi->fib_dead)
    + continue;
    if (fa->fa_info->fib_scope < flp->flowi4_scope)

     \ /
      Last update: 2012-06-08 08:22    [W:0.020 / U:112.536 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site