mlx4: Fix bug in mlx4_ib_mcg_attach
Subsystems (2)
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
@@ -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
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
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.
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
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.