aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_provider.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2020-09-26 13:24:48 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-09-29 13:11:06 -0300
commitb925c555a15de8443ecb2e147b54b1bbe9b71fe3 (patch)
tree9fccc1de16f5ab65c0da03ca721a871183a8d3b1 /drivers/infiniband/hw/mthca/mthca_provider.c
parentRDMA/core: Align write and ioctl checks of QP types (diff)
downloadlinux-dev-b925c555a15de8443ecb2e147b54b1bbe9b71fe3.tar.xz
linux-dev-b925c555a15de8443ecb2e147b54b1bbe9b71fe3.zip
RDMA/drivers: Remove udata check from special QP
GSI QP can't be created from the user space, hence the udata check is always false (udata == NULL). Remove that check and simplify the flow. Link: https://lore.kernel.org/r/20200926102450.2966017-9-leon@kernel.org Reviewed-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 82ee252fe5aa..5dbddf8faf99 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -535,10 +535,6 @@ static struct ib_qp *mthca_create_qp(struct ib_pd *pd,
case IB_QPT_SMI:
case IB_QPT_GSI:
{
- /* Don't allow userspace to create special QPs */
- if (udata)
- return ERR_PTR(-EINVAL);
-
qp = kzalloc(sizeof(struct mthca_sqp), GFP_KERNEL);
if (!qp)
return ERR_PTR(-ENOMEM);