projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
RDMA: Check attr_mask during modify_qp
[linux-2.6-block.git]
/
drivers
/
infiniband
/
hw
/
mlx4
/
qp.c
diff --git
a/drivers/infiniband/hw/mlx4/qp.c
b/drivers/infiniband/hw/mlx4/qp.c
index 5cb8e602294ca9ad1e89000991c307d84b3984a1..8834629615bc6d546b7a22c45afd07c7b7946d8e 100644
(file)
--- a/
drivers/infiniband/hw/mlx4/qp.c
+++ b/
drivers/infiniband/hw/mlx4/qp.c
@@
-2787,6
+2787,9
@@
int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
struct mlx4_ib_qp *mqp = to_mqp(ibqp);
int ret;
+ if (attr_mask & ~IB_QP_ATTR_STANDARD_BITS)
+ return -EOPNOTSUPP;
+
ret = _mlx4_ib_modify_qp(ibqp, attr, attr_mask, udata);
if (mqp->mlx4_ib_qp_type == MLX4_IB_QPT_GSI) {