From: Shirley Ma <[EMAIL PROTECTED]>

IPoIB small fixes: Initialize path->ah to NULL, and fix dereference
after free of neigh in error path of neigh_add_path().

Signed-off-by: Shirley Ma <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>


--- linux-export.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2005-03-02 
20:26:13.207621227 -0800
+++ linux-export/drivers/infiniband/ulp/ipoib/ipoib_main.c      2005-03-02 
20:26:13.653524436 -0800
@@ -346,8 +346,9 @@
        if (!path)
                return NULL;
 
-       path->dev = dev;
+       path->dev          = dev;
        path->pathrec.dlid = 0;
+       path->ah           = NULL;
 
        skb_queue_head_init(&path->queue);
 
@@ -450,8 +451,8 @@
 err:
        *to_ipoib_neigh(skb->dst->neighbour) = NULL;
        list_del(&neigh->list);
-       kfree(neigh);
        neigh->neighbour->ops->destructor = NULL;
+       kfree(neigh);
 
        ++priv->stats.tx_dropped;
        dev_kfree_skb_any(skb);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to