lkml.org 
[lkml]   [2007]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 19/31] : Fix GFP_KERNEL with preemption disabled in fib_trie
    -stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Robert Olsson <robert.olsson@its.uu.se>

    [IPV4]: Do not disable preemption in trie_leaf_remove().

    Hello, Just discussed this Patrick...

    We have two users of trie_leaf_remove, fn_trie_flush and fn_trie_delete
    both are holding RTNL. So there shouldn't be need for this preempt stuff.
    This is assumed to a leftover from an older RCU-take.

    > Mhh .. I think I just remembered something - me incorrectly suggesting
    > to add it there while we were talking about this at OLS :) IIRC the
    > idea was to make sure tnode_free (which at that time didn't use
    > call_rcu) wouldn't free memory while still in use in a rcu read-side
    > critical section. It should have been synchronize_rcu of course,
    > but with tnode_free using call_rcu it seems to be completely
    > unnecessary. So I guess we can simply remove it.

    Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
    Signed-off-by: Patrick McHardy <kaber@trash.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    net/ipv4/fib_trie.c | 2 --
    1 file changed, 2 deletions(-)

    --- a/net/ipv4/fib_trie.c
    +++ b/net/ipv4/fib_trie.c
    @@ -1528,7 +1528,6 @@ static int trie_leaf_remove(struct trie
    t->revision++;
    t->size--;

    - preempt_disable();
    tp = NODE_PARENT(n);
    tnode_free((struct tnode *) n);

    @@ -1538,7 +1537,6 @@ static int trie_leaf_remove(struct trie
    rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
    } else
    rcu_assign_pointer(t->trie, NULL);
    - preempt_enable();

    return 1;
    }
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-03-19 22:47    [W:2.213 / U:0.612 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site