lkml.org 
[lkml]   [2005]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH][9/11] IB/ipoib: small fixes
Date
From
From: Shirley Ma <xma@us.ibm.com>

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@us.ibm.com>
Signed-off-by: Roland Dreier <roland@topspin.com>


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

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.061 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site