Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314968
b: refs/heads/master
c: 178709b
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 5, 2012
1 parent bbd3dd8 commit a955424
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbedbe6d56e8944f220e34deb9ebdf4bec2a2afd
refs/heads/master: 178709bbfe9d4fe432c272ed65a34b8582703c23
4 changes: 3 additions & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)

rcu_read_lock();
if (likely(skb_dst(skb))) {
n = dst_get_neighbour_noref(skb_dst(skb));
n = dst_neigh_lookup_skb(skb_dst(skb), skb);
if (!n) {
++dev->stats.tx_dropped;
dev_kfree_skb_any(skb);
Expand Down Expand Up @@ -797,6 +797,8 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
}
unlock:
if (n)
neigh_release(n);
rcu_read_unlock();
return NETDEV_TX_OK;
}
Expand Down
22 changes: 13 additions & 9 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,16 +720,20 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)

rcu_read_lock();
if (dst)
n = dst_get_neighbour_noref(dst);
if (n && !*to_ipoib_neigh(n)) {
struct ipoib_neigh *neigh = ipoib_neigh_alloc(n,
skb->dev);

if (neigh) {
kref_get(&mcast->ah->ref);
neigh->ah = mcast->ah;
list_add_tail(&neigh->list, &mcast->neigh_list);
n = dst_neigh_lookup_skb(dst, skb);
if (n) {
if (!*to_ipoib_neigh(n)) {
struct ipoib_neigh *neigh;

neigh = ipoib_neigh_alloc(n, skb->dev);
if (neigh) {
kref_get(&mcast->ah->ref);
neigh->ah = mcast->ah;
list_add_tail(&neigh->list,
&mcast->neigh_list);
}
}
neigh_release(n);
}
rcu_read_unlock();
spin_unlock_irqrestore(&priv->lock, flags);
Expand Down

0 comments on commit a955424

Please sign in to comment.