summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/nldev.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2023-10-04 21:17:49 +0300
committerLeon Romanovsky <leon@kernel.org>2023-10-05 20:01:47 +0300
commitc38d23a54445f9a8aa6831fafc9af0496ba02f9e (patch)
tree5930e8baeb905f2182e6672eb163c1635a7d3f2d /drivers/infiniband/core/nldev.c
parentc99a7457e5bb873914a74307ba2df85f6799203b (diff)
downloadlinux-c38d23a54445f9a8aa6831fafc9af0496ba02f9e.tar.xz
RDMA/core: Require admin capabilities to set system parameters
Like any other set command, require admin permissions to do it. Cc: stable@vger.kernel.org Fixes: 2b34c5580226 ("RDMA/core: Add command to set ib_core device net namspace sharing mode") Link: https://lore.kernel.org/r/75d329fdd7381b52cbdf87910bef16c9965abb1f.1696443438.git.leon@kernel.org Reviewed-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'drivers/infiniband/core/nldev.c')
-rw-r--r--drivers/infiniband/core/nldev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index d5d3e4f0de77..6d1dbc978759 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -2529,6 +2529,7 @@ static const struct rdma_nl_cbs nldev_cb_table[RDMA_NLDEV_NUM_OPS] = {
},
[RDMA_NLDEV_CMD_SYS_SET] = {
.doit = nldev_set_sys_set_doit,
+ .flags = RDMA_NL_ADMIN_PERM,
},
[RDMA_NLDEV_CMD_STAT_SET] = {
.doit = nldev_stat_set_doit,