diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2021-08-03 21:20:36 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-08-03 15:26:18 -0300 |
commit | 00a79d6b996d46e9077b0d02a19c87b99305b94a (patch) | |
tree | 15ec566a25e873e4d2e2c5105b1b0661caa05ad2 /drivers/infiniband/core/uverbs_std_types_qp.c | |
parent | RDMA/core: Reorganize create QP low-level functions (diff) | |
download | linux-dev-00a79d6b996d46e9077b0d02a19c87b99305b94a.tar.xz linux-dev-00a79d6b996d46e9077b0d02a19c87b99305b94a.zip |
RDMA/core: Configure selinux QP during creation
All QP creation flows called ib_create_qp_security(), but differently.
This caused to the need to provide exclusion conditions for the XRC_TGT,
because such QP already had selinux configuration call.
In order to fix it, move ib_create_qp_security() to the general QP
creation routine.
Link: https://lore.kernel.org/r/4d7cd6f5828aca37fb62283e6b126b73ab86b18c.1628014762.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types_qp.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_std_types_qp.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types_qp.c b/drivers/infiniband/core/uverbs_std_types_qp.c index c00cfb5ed387..92812f6a21b0 100644 --- a/drivers/infiniband/core/uverbs_std_types_qp.c +++ b/drivers/infiniband/core/uverbs_std_types_qp.c @@ -280,12 +280,6 @@ static int UVERBS_HANDLER(UVERBS_METHOD_QP_CREATE)( obj->uevent.uobject.object = qp; uverbs_finalize_uobj_create(attrs, UVERBS_ATTR_CREATE_QP_HANDLE); - if (attr.qp_type != IB_QPT_XRC_TGT) { - ret = ib_create_qp_security(qp, device); - if (ret) - return ret; - } - set_caps(&attr, &cap, false); ret = uverbs_copy_to_struct_or_zero(attrs, UVERBS_ATTR_CREATE_QP_RESP_CAP, &cap, |