aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_multicast.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 3871ac663554..ecea4fe1ed00 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -258,11 +258,15 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
258 netif_tx_lock_bh(dev); 258 netif_tx_lock_bh(dev);
259 while (!skb_queue_empty(&mcast->pkt_queue)) { 259 while (!skb_queue_empty(&mcast->pkt_queue)) {
260 struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue); 260 struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue);
261 struct dst_entry *dst = skb_dst(skb);
262 struct neighbour *n = NULL;
263
261 netif_tx_unlock_bh(dev); 264 netif_tx_unlock_bh(dev);
262 265
263 skb->dev = dev; 266 skb->dev = dev;
264 267 if (dst)
265 if (!skb_dst(skb) || !skb_dst(skb)->neighbour) { 268 n = dst_get_neighbour(dst);
269 if (!dst || !n) {
266 /* put pseudoheader back on for next time */ 270 /* put pseudoheader back on for next time */
267 skb_push(skb, sizeof (struct ipoib_pseudoheader)); 271 skb_push(skb, sizeof (struct ipoib_pseudoheader));
268 } 272 }
@@ -715,11 +719,13 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
715 719
716out: 720out:
717 if (mcast && mcast->ah) { 721 if (mcast && mcast->ah) {
718 if (skb_dst(skb) && 722 struct dst_entry *dst = skb_dst(skb);
719 skb_dst(skb)->neighbour && 723 struct neighbour *n = NULL;
720 !*to_ipoib_neigh(skb_dst(skb)->neighbour)) { 724 if (dst)
721 struct ipoib_neigh *neigh = ipoib_neigh_alloc(skb_dst(skb)->neighbour, 725 n = dst_get_neighbour(dst);
722 skb->dev); 726 if (n && !*to_ipoib_neigh(n)) {
727 struct ipoib_neigh *neigh = ipoib_neigh_alloc(n,
728 skb->dev);
723 729
724 if (neigh) { 730 if (neigh) {
725 kref_get(&mcast->ah->ref); 731 kref_get(&mcast->ah->ref);