Skip to contentSkip to conversation

mlx4_ib: Fix error flow in post send

PATCH New Eli Cohen 1 participant 1 message Feb 9, 2012

Subsystems (2)
lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH 1/1 mlx4_ib: Fix error flow in post send

If the opcode of a work request exceeds the range of valid opcodes, return the pointer to the offending work request.

---
 drivers/infiniband/hw/mlx4/qp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/infiniband/hw/mlx4/qp.c +1 -0
index fe5b218..deec192 100644
@@ -1930,6 +1930,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 		wmb();
 
 		if (wr->opcode < 0 || wr->opcode >= ARRAY_SIZE(mlx4_ib_opcode)) {
+			*bad_wr = wr;
 			err = -EINVAL;
 			goto out;
 		}
Signature · 6 lines
1.7.9

--
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