Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82b399133b6ebf667ee635fc69ef26b61eede4bc
Commit:     82b399133b6ebf667ee635fc69ef26b61eede4bc
Parent:     5180311fe93842e9e16eb7297cfc4aded752ab33
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 12 14:48:18 2006 -0800
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Dec 12 14:48:18 2006 -0800

    IPoIB: Make sure struct ipoib_neigh.queue is always initialized
    
    Move the initialization of ipoib_neigh's skb_queue into
    ipoib_neigh_alloc(), since commit 2745b5b7 ("IPoIB: Fix skb leak when
    freeing neighbour") will make iterate over the skb_queue to free any
    packets left over when freeing the ipoib_neigh structure.
    
    This fixes a crash when freeing ipoib_neigh structures allocated in
    ipoib_mcast_send(), which otherwise don't have their skb_queue
    initialized.
    
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c 
b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index c092802..705eb1d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -497,8 +497,6 @@ static void neigh_add_path(struct sk_buff *skb, struct 
net_device *dev)
                return;
        }
 
-       skb_queue_head_init(&neigh->queue);
-
        /*
         * We can only be called from ipoib_start_xmit, so we're
         * inside tx_lock -- no need to save/restore flags.
@@ -806,6 +804,7 @@ struct ipoib_neigh *ipoib_neigh_alloc(struct neighbour 
*neighbour)
 
        neigh->neighbour = neighbour;
        *to_ipoib_neigh(neighbour) = neigh;
+       skb_queue_head_init(&neigh->queue);
 
        return neigh;
 }
-
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