summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/usnic
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2014-05-11 15:15:10 +0300
committerRoland Dreier <roland@purestorage.com>2014-06-02 14:58:11 -0700
commit60093dc0c8b6407bc7494cbcb3e84322cc6782c8 (patch)
treeb9eb3c7a9ed70625bbe3752dd9ef49e19a6ee483 /drivers/infiniband/hw/usnic
parentd6d211db37e75de2ddc3a4f979038c40df7cc79c (diff)
downloadlinux-60093dc0c8b6407bc7494cbcb3e84322cc6782c8.tar.bz2
IB: Return error for unsupported QP creation flags
Fix the usnic and thw qib drivers to err when QP creation flags that they don't understand are provided. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/usnic')
-rw-r--r--drivers/infiniband/hw/usnic/usnic_ib_verbs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index d48d2c0a2e3c..53bd6a2d9cdb 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -466,6 +466,9 @@ struct ib_qp *usnic_ib_create_qp(struct ib_pd *pd,
ucontext = to_uucontext(pd->uobject->context);
us_ibdev = to_usdev(pd->device);
+ if (init_attr->create_flags)
+ return ERR_PTR(-EINVAL);
+
err = ib_copy_from_udata(&cmd, udata, sizeof(cmd));
if (err) {
usnic_err("%s: cannot copy udata for create_qp\n",