[PATCH][9/11] IB/ipoib: small fixes

From: Roland Dreier
Date: Thu Mar 03 2005 - 01:46:12 EST


From: Shirley Ma <xma@xxxxxxxxxx>

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 <xma@xxxxxxxxxx>
Signed-off-by: Roland Dreier <roland@xxxxxxxxxxx>


--- 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/