Commit c38d23a5 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Leon Romanovsky

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: 2b34c558 ("RDMA/core: Add command to set ib_core device net namspace sharing mode")
Link: https://lore.kernel.org/r/75d329fdd7381b52cbdf87910bef16c9965abb1f.1696443438.git.leon@kernel.orgReviewed-by: default avatarParav Pandit <parav@nvidia.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
parent c99a7457
...@@ -2529,6 +2529,7 @@ static const struct rdma_nl_cbs nldev_cb_table[RDMA_NLDEV_NUM_OPS] = { ...@@ -2529,6 +2529,7 @@ static const struct rdma_nl_cbs nldev_cb_table[RDMA_NLDEV_NUM_OPS] = {
}, },
[RDMA_NLDEV_CMD_SYS_SET] = { [RDMA_NLDEV_CMD_SYS_SET] = {
.doit = nldev_set_sys_set_doit, .doit = nldev_set_sys_set_doit,
.flags = RDMA_NL_ADMIN_PERM,
}, },
[RDMA_NLDEV_CMD_STAT_SET] = { [RDMA_NLDEV_CMD_STAT_SET] = {
.doit = nldev_stat_set_doit, .doit = nldev_stat_set_doit,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment