mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
RDMA/uverbs: Fill in the response for IB_USER_VERBS_EX_CMD_MODIFY_QP
A response struct was defined, and userspace is providing it (but not checking it). Fill it in and write it out. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
29a29d1852
commit
40efca7a46
1 changed files with 8 additions and 1 deletions
|
@ -1953,6 +1953,9 @@ static int ib_uverbs_ex_modify_qp(struct uverbs_attr_bundle *attrs,
|
|||
struct ib_udata *ucore)
|
||||
{
|
||||
struct ib_uverbs_ex_modify_qp cmd;
|
||||
struct ib_uverbs_ex_modify_qp_resp resp = {
|
||||
.response_length = uverbs_response_length(attrs, sizeof(resp))
|
||||
};
|
||||
int ret;
|
||||
|
||||
ret = uverbs_request(attrs, &cmd, sizeof(cmd));
|
||||
|
@ -1969,7 +1972,11 @@ static int ib_uverbs_ex_modify_qp(struct uverbs_attr_bundle *attrs,
|
|||
~((IB_USER_LAST_QP_ATTR_MASK << 1) - 1))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return modify_qp(attrs, &cmd);
|
||||
ret = modify_qp(attrs, &cmd);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return uverbs_response(attrs, &resp, sizeof(resp));
|
||||
}
|
||||
|
||||
static int ib_uverbs_destroy_qp(struct uverbs_attr_bundle *attrs,
|
||||
|
|
Loading…
Reference in a new issue