diff options
| -rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 16d55710b116..d0202bb176a4 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
| @@ -1971,6 +1971,12 @@ static int modify_qp(struct ib_uverbs_file *file, | |||
| 1971 | goto release_qp; | 1971 | goto release_qp; |
| 1972 | } | 1972 | } |
| 1973 | 1973 | ||
| 1974 | if ((cmd->base.attr_mask & IB_QP_ALT_PATH) && | ||
| 1975 | !rdma_is_port_valid(qp->device, cmd->base.alt_port_num)) { | ||
| 1976 | ret = -EINVAL; | ||
| 1977 | goto release_qp; | ||
| 1978 | } | ||
| 1979 | |||
| 1974 | attr->qp_state = cmd->base.qp_state; | 1980 | attr->qp_state = cmd->base.qp_state; |
| 1975 | attr->cur_qp_state = cmd->base.cur_qp_state; | 1981 | attr->cur_qp_state = cmd->base.cur_qp_state; |
| 1976 | attr->path_mtu = cmd->base.path_mtu; | 1982 | attr->path_mtu = cmd->base.path_mtu; |
