Skip to content

Commit dc52aad

Browse files
Thomas Bogendoerferrleon
authored andcommitted
RDMA/mthca: Fix crash when polling CQ for shared QPs
Commit 21c2fe9 ("RDMA/mthca: Combine special QP struct with mthca QP") introduced a new struct mthca_sqp which doesn't contain struct mthca_qp any longer. Placing a pointer of this new struct into qptable leads to crashes, because mthca_poll_one() expects a qp pointer. Fix this by putting the correct pointer into qptable. Fixes: 21c2fe9 ("RDMA/mthca: Combine special QP struct with mthca QP") Signed-off-by: Thomas Bogendoerfer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 0e15863 commit dc52aad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mthca/mthca_qp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ int mthca_alloc_sqp(struct mthca_dev *dev,
13931393
if (mthca_array_get(&dev->qp_table.qp, mqpn))
13941394
err = -EBUSY;
13951395
else
1396-
mthca_array_set(&dev->qp_table.qp, mqpn, qp->sqp);
1396+
mthca_array_set(&dev->qp_table.qp, mqpn, qp);
13971397
spin_unlock_irq(&dev->qp_table.lock);
13981398

13991399
if (err)

0 commit comments

Comments
 (0)