Commit 02413477 authored by Shirley Ma's avatar Shirley Ma Committed by Linus Torvalds

[PATCH] IB/ipoib: small fixes

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: default avatarShirley Ma <xma@us.ibm.com>
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 881fca9e
......@@ -346,8 +346,9 @@ static struct ipoib_path *path_rec_create(struct net_device *dev,
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 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment