Skip to content

Commit bb5204c

Browse files
committed
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull IB regression fixes from Roland Dreier: - Fix mlx4 VFs not working on old guests because of 64B CQE changes - Fix ill-considered sparse fix for qib - Fix IPoIB crash due to skb double destruct introduced in 3.8-rc1 * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/qib: Fix for broken sparse warning fix mlx4_core: Fix advertisement of wrong PF context behaviour IPoIB: Fix crash due to skb double destruct
2 parents 8d19514 + cbdba97 commit bb5204c

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

drivers/infiniband/hw/qib/qib_qp.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -263,20 +263,15 @@ static void remove_qp(struct qib_ibdev *dev, struct qib_qp *qp)
263263
struct qib_qp __rcu **qpp;
264264

265265
qpp = &dev->qp_table[n];
266-
q = rcu_dereference_protected(*qpp,
267-
lockdep_is_held(&dev->qpt_lock));
268-
for (; q; qpp = &q->next) {
266+
for (; (q = rcu_dereference_protected(*qpp,
267+
lockdep_is_held(&dev->qpt_lock))) != NULL;
268+
qpp = &q->next)
269269
if (q == qp) {
270270
atomic_dec(&qp->refcount);
271271
*qpp = qp->next;
272272
rcu_assign_pointer(qp->next, NULL);
273-
q = rcu_dereference_protected(*qpp,
274-
lockdep_is_held(&dev->qpt_lock));
275273
break;
276274
}
277-
q = rcu_dereference_protected(*qpp,
278-
lockdep_is_held(&dev->qpt_lock));
279-
}
280275
}
281276

282277
spin_unlock_irqrestore(&dev->qpt_lock, flags);

drivers/infiniband/ulp/ipoib/ipoib_cm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,9 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
741741

742742
tx_req->mapping = addr;
743743

744+
skb_orphan(skb);
745+
skb_dst_drop(skb);
746+
744747
rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
745748
addr, skb->len);
746749
if (unlikely(rc)) {
@@ -752,9 +755,6 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
752755
dev->trans_start = jiffies;
753756
++tx->tx_head;
754757

755-
skb_orphan(skb);
756-
skb_dst_drop(skb);
757-
758758
if (++priv->tx_outstanding == ipoib_sendq_size) {
759759
ipoib_dbg(priv, "TX ring 0x%x full, stopping kernel net queue\n",
760760
tx->qp->qp_num);

drivers/infiniband/ulp/ipoib/ipoib_ib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,9 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
600600
netif_stop_queue(dev);
601601
}
602602

603+
skb_orphan(skb);
604+
skb_dst_drop(skb);
605+
603606
rc = post_send(priv, priv->tx_head & (ipoib_sendq_size - 1),
604607
address->ah, qpn, tx_req, phead, hlen);
605608
if (unlikely(rc)) {
@@ -615,9 +618,6 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
615618

616619
address->last_send = priv->tx_head;
617620
++priv->tx_head;
618-
619-
skb_orphan(skb);
620-
skb_dst_drop(skb);
621621
}
622622

623623
if (unlikely(priv->tx_outstanding > MAX_SEND_CQE))

drivers/net/ethernet/mellanox/mlx4/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
380380
}
381381
}
382382

383-
if ((dev_cap->flags &
383+
if ((dev->caps.flags &
384384
(MLX4_DEV_CAP_FLAG_64B_CQE | MLX4_DEV_CAP_FLAG_64B_EQE)) &&
385385
mlx4_is_master(dev))
386386
dev->caps.function_caps |= MLX4_FUNC_CAP_64B_EQE_CQE;

0 commit comments

Comments
 (0)