Commit d6ad67112a78623025632865d716b2f7645874c5
Committed by
Linus Torvalds
1 parent
5efee174f8
Exists in
master
and in
20 other branches
[PATCH] Publish rcutorture module parameters via sysfs, read-only
rcutorture's module parameters currently use permissions of 0, so they don't show up in /sys/module/rcutorture/parameters. Change the permissions on all module parameters to world-readable (0444). rcutorture does all of its initialization and thread startup when loaded and relies on the parameters not changing during execution, so they should not permit writing. However, reading seems fine. Signed-off-by: Josh Triplett <josh@freedesktop.org> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 7 additions and 7 deletions Side-by-side Diff
kernel/rcutorture.c
... | ... | @@ -60,19 +60,19 @@ |
60 | 60 | static int shuffle_interval = 5; /* Interval between shuffles (in sec)*/ |
61 | 61 | static char *torture_type = "rcu"; /* What RCU implementation to torture. */ |
62 | 62 | |
63 | -module_param(nreaders, int, 0); | |
63 | +module_param(nreaders, int, 0444); | |
64 | 64 | MODULE_PARM_DESC(nreaders, "Number of RCU reader threads"); |
65 | -module_param(nfakewriters, int, 0); | |
65 | +module_param(nfakewriters, int, 0444); | |
66 | 66 | MODULE_PARM_DESC(nfakewriters, "Number of RCU fake writer threads"); |
67 | -module_param(stat_interval, int, 0); | |
67 | +module_param(stat_interval, int, 0444); | |
68 | 68 | MODULE_PARM_DESC(stat_interval, "Number of seconds between stats printk()s"); |
69 | -module_param(verbose, bool, 0); | |
69 | +module_param(verbose, bool, 0444); | |
70 | 70 | MODULE_PARM_DESC(verbose, "Enable verbose debugging printk()s"); |
71 | -module_param(test_no_idle_hz, bool, 0); | |
71 | +module_param(test_no_idle_hz, bool, 0444); | |
72 | 72 | MODULE_PARM_DESC(test_no_idle_hz, "Test support for tickless idle CPUs"); |
73 | -module_param(shuffle_interval, int, 0); | |
73 | +module_param(shuffle_interval, int, 0444); | |
74 | 74 | MODULE_PARM_DESC(shuffle_interval, "Number of seconds between shuffles"); |
75 | -module_param(torture_type, charp, 0); | |
75 | +module_param(torture_type, charp, 0444); | |
76 | 76 | MODULE_PARM_DESC(torture_type, "Type of RCU to torture (rcu, rcu_bh, srcu)"); |
77 | 77 | |
78 | 78 | #define TORTURE_FLAG "-torture:" |