]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net/mlx5: Bridge, set debugfs access right to root-only
authorVlad Buslov <vladbu@nvidia.com>
Tue, 27 Jun 2023 07:26:56 +0000 (09:26 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 26 Jul 2023 21:31:04 +0000 (14:31 -0700)
As suggested during code review set the access rights for bridge 'fdb'
debugfs file to root-only.

Fixes: 791eb78285e8 ("net/mlx5: Bridge, expose FDB state via debugfs")
Reported-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/netdev/20230619120515.5045132a@kernel.org/
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_debugfs.c

index b6a45eff28f554be7456be783ad24f4b104ae0b5..dbd7cbe6cbf3632d5ce97a0ee0d39a53d4d37a88 100644 (file)
@@ -64,7 +64,7 @@ void mlx5_esw_bridge_debugfs_init(struct net_device *br_netdev, struct mlx5_esw_
 
        bridge->debugfs_dir = debugfs_create_dir(br_netdev->name,
                                                 bridge->br_offloads->debugfs_root);
-       debugfs_create_file("fdb", 0444, bridge->debugfs_dir, bridge,
+       debugfs_create_file("fdb", 0400, bridge->debugfs_dir, bridge,
                            &mlx5_esw_bridge_debugfs_fops);
 }