projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23c15c2
)
IB/mlx4: Fix check of opcode in mlx4_ib_post_send()
author
Roland Dreier
<rolandd@cisco.com>
Sat, 19 May 2007 15:51:58 +0000
(08:51 -0700)
committer
Roland Dreier
<rolandd@cisco.com>
Sat, 19 May 2007 15:51:58 +0000
(08:51 -0700)
wr->opcode is invalid if it's >= ARRAY_SIZE(mlx4_ib_opcode), not just
strictly >.
This was spotted by the Coverity checker (CID 1643).
Signed-off-by: Roland Dreier <rolandd@cisco.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 bd28af5753d1b5a4c7cb24ba5ef09b0139a00205..5706f988e2ec79a00fd6cca1d4286c980712d8c8 100644
(file)
--- a/
drivers/infiniband/hw/mlx4/qp.c
+++ b/
drivers/infiniband/hw/mlx4/qp.c
@@
-1238,7
+1238,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)) {
+ if (wr->opcode < 0 || wr->opcode >
=
ARRAY_SIZE(mlx4_ib_opcode)) {
err = -EINVAL;
goto out;
}