Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ae289444b968b4cefd776ada8da519ce10e56fa
Commit:     4ae289444b968b4cefd776ada8da519ce10e56fa
Parent:     f1673ca52c04f1b311abe03fd67cd4d650d19435
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 12:54:15 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 12:54:15 2007 -0700

    [NEIGH]: Ensure that pneigh_lookup is protected with RTNL
    
    The pnigh_lookup is used to lookup proxy entries and to
    create them in case lookup failed.
    
    However, the "creation" code does not perform the re-lookup
    after GFP_KERNEL allocation. This is done because the code
    is expected to be protected with the RTNL lock, so add the
    assertion (mainly to address future questions from new network
    developers like me :) ).
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/neighbour.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index c52df85..cd3af59 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -481,6 +481,8 @@ struct pneigh_entry * pneigh_lookup(struct neigh_table 
*tbl, const void *pkey,
        if (!creat)
                goto out;
 
+       ASSERT_RTNL();
+
        n = kmalloc(sizeof(*n) + key_len, GFP_KERNEL);
        if (!n)
                goto out;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to