RDMA/core: Require admin capabilities to set system parameters
PATCH 1/1 RDMA/core: Require admin capabilities to set system parameters
From: Leon Romanovsky <[email protected]>
Like any other set command, require admin permissions to do it.
Fixes 2b34c5580226 ("RDMA/core: Add command to set ib_core device net namspace sharing mode")
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/core/nldev.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/core/nldev.c +1 -0
@@ -2595,6 +2595,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,
Signature · 1 line
2.41.0
Quoted 29 lines
From: Leon Romanovsky <[email protected]>
Sent: Wednesday, October 4, 2023 11:48 PMFrom: Leon Romanovsky <[email protected]>
Like any other set command, require admin permissions to do it.
Fixes 2b34c5580226 ("RDMA/core: Add command to set ib_core device netnamspace sharing mode")
Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/core/nldev.c | 1 + 1 file changed, 1 insertion(+)drivers/infiniband/core/nldev.c +1
-0@@ -2595,6 +2595,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] = {
Quoted 3 lines
.doit =
nldev_stat_set_doit,
--
2.41.0
Reviewed-by Parav Pandit <[email protected]>
Leon Romanovsky
AppliedQuoted 3 lines · Leon Romanovsky
Like any other set command, require admin permissions to do it.
Applied, thanks!
[1/1] RDMA/core: Require admin capabilities to set system parameters
https://git.kernel.org/rdma/rdma/c/c38d23a54445f9
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>