IB: Return error for unsupported QP creation flags
[linux-2.6-block.git] / drivers / infiniband / hw / usnic / usnic_ib_verbs.c
index d48d2c0a2e3ca10dcf7272da71ce44110f957346..53bd6a2d9cdbbae4545a70d1d070b17eafb18154 100644 (file)
@@ -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",