RE: [PATCH rdma-rc] RDMA/core: Require admin capabilities to set system parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> From: Leon Romanovsky <leon@xxxxxxxxxx>
> Sent: Wednesday, October 4, 2023 11:48 PM
> 
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
> 
> Like any other set command, require admin permissions to do it.
> 
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 2b34c5580226 ("RDMA/core: Add command to set ib_core device net
> namspace sharing mode")
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
> ---
>  drivers/infiniband/core/nldev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
> index 5c805fa6187f..87b8cd657fb3 100644
> --- a/drivers/infiniband/core/nldev.c
> +++ b/drivers/infiniband/core/nldev.c
> @@ -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,
> --
> 2.41.0

Reviewed-by: Parav Pandit <parav@xxxxxxxxxx>




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux