projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b21d18
)
IB/mlx4: Set bad_wr for invalid send opcode
author
Eli Cohen
<eli@dev.mellanox.co.il>
Thu, 9 Feb 2012 16:52:50 +0000
(18:52 +0200)
committer
Roland Dreier
<roland@purestorage.com>
Sun, 26 Feb 2012 09:37:30 +0000
(
01:37
-0800)
If the opcode of a work request exceeds the range of valid opcodes,
return the pointer to the offending work request.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/qp.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/hw/mlx4/qp.c
b/drivers/infiniband/hw/mlx4/qp.c
index aa2aefa4236c1295ad53aba2b21422e244974a97..3a78489666277eeb97a77ce65c5fa9ff804b5339 100644
(file)
--- a/
drivers/infiniband/hw/mlx4/qp.c
+++ b/
drivers/infiniband/hw/mlx4/qp.c
@@
-1884,6
+1884,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;
}