Skip to contentSkip to conversation

mlx4: Fix bug in mlx4_ib_mcg_attach

PATCH In review Eli Cohen 3 participants 5 messages Dec 8, 2009 – Dec 10, 2009 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH 1/1 mlx4: Fix bug in mlx4_ib_mcg_attach

The "!" operator has precedence over the "&" operator so parenthesis are required to properly evaluate the user's loopback requirement.

---
 drivers/infiniband/hw/mlx4/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx4/main.c +2 -2
index 0f6ef38..736eea0 100644
@@ -586,8 +586,8 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
 	struct mlx4_ib_dev *mdev = to_mdev(ibqp->device);
 	struct mlx4_ib_qp *mqp = to_mqp(ibqp);
 
-	err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, !!mqp->flags &
-				    MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK);
+	err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, !!(mqp->flags &
+				    MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK));
 	if (err)
 		return err;
 
Signature · 6 lines
1.6.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

This bug doesn't seem to ever have been present in the upstream kernel -- what are you generating this patch against?

- R.

A message that is not in the archive (sent off-list or not yet received): aday6lbpykk.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org

#3 lore raw
Quoted 3 lines · Roland Dreier

This bug doesn't seem to ever have been present in the upstream kernel -- what are you generating this patch against?

I think it came from your for-next branch.

#4 lore raw
Quoted 5 lines
Quoted 3 lines

This bug doesn't seem to ever have been present in the upstream kernel -- what are you generating this patch against?

I think it came from your for-next branch.

I don't see anything touching this code there. The patch that introduced this code upstream, 521e575b ("IB/mlx4: Add support for blocking multicast loopback packets") doesn't have this bug and I don't see anything else that changed that area of the code.

- R.

A message that is not in the archive (sent off-list or not yet received): adad42npxtg.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org

#6 lore raw
Quoted 6 lines · Roland Dreier

I don't see anything touching this code there. The patch that introduced this code upstream, 521e575b ("IB/mlx4: Add support for blocking multicast loopback packets") doesn't have this bug and I don't see anything else that changed that area of the code.

Your branch, my bug :-) I put it in one of my commits.