[openib-general] [PATCH] ipoib: error handling fix

Michael S. Tsirkin mst at mellanox.co.il
Thu Dec 22 07:18:17 PST 2005


The following patch needs to be applied on top of the patch
series I posted previously.

---

Fix error handling in neigh_add_path: avoid calling list_del
on an uninitialized neigh->list.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: openib/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- openib.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2005-12-22 16:47:48.000000000 +0200
+++ openib/drivers/infiniband/ulp/ipoib/ipoib_main.c	2005-12-22 16:51:49.000000000 +0200
@@ -496,7 +496,7 @@ static void neigh_add_path(struct sk_buf
 		path = path_rec_create(dev,
 				       (union ib_gid *) (skb->dst->neighbour->ha + 4));
 		if (!path)
-			goto err;
+			goto err_path;
 
 		__path_add(dev, path);
 	}
@@ -527,6 +527,7 @@ static void neigh_add_path(struct sk_buf
 
 err:
 	list_del(&neigh->list);
+err_path:
 	ipoib_neigh_free(neigh);
 	++priv->stats.tx_dropped;
 	dev_kfree_skb_any(skb);

-- 
MST



More information about the general mailing list