[PATCH 4/4] wifi: mac80211_hwsim: use more restrictive permissions on debugfs files

Amol Dhamale
2025-10-21T20:52:00Z

ERROR: Exporting writable files is usually an error. Consider more restrictive permissions.

Signed-off-by: Amol Dhamale <amoldhamale1105@gmail.com>
---
drivers/net/wireless/virtual/mac80211_hwsim.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
index e62d4a98671f..7b206a4d57b6 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -5816,10 +5816,10 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
}

data->debugfs = debugfs_create_dir("hwsim", hw->wiphy->debugfsdir);
- debugfs_create_file("ps", 0666, data->debugfs, data, &hwsim_fops_ps);
- debugfs_create_file("group", 0666, data->debugfs, data,
+ debugfs_create_file("ps", 0644, data->debugfs, data, &hwsim_fops_ps);
+ debugfs_create_file("group", 0644, data->debugfs, data,
&hwsim_fops_group);
- debugfs_create_file("rx_rssi", 0666, data->debugfs, data,
+ debugfs_create_file("rx_rssi", 0644, data->debugfs, data,
&hwsim_fops_rx_rssi);
if (!data->use_chanctx)
debugfs_create_file("dfs_simulate_radar", 0222,
--
2.43.0