[PATCH 5/7] sysctl: Cleanup the sched debug sysctl usage.
- From: ebiederm@xxxxxxxxxxxx (Eric W. Biederman)
- Date: Fri, 10 Aug 2007 15:08:52 -0600
- The ctl_name for the kernel directory is CTL_KERN
- It is impoosible to write to sysctl directories so do not
give users write permissions.
This is enough to stop sysctl_check_table from complaining about
the sched debug sysctls.
My apologies for not sending this earlier I had the impression
Ingo's tree had diverged significantly from what was in the
stable tree.
Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
---
kernel/sched.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index b0afd8d..47afd80 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5223,15 +5223,16 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
static struct ctl_table sd_ctl_dir[] = {
{
.procname = "sched_domain",
- .mode = 0755,
+ .mode = 0555,
},
{0,},
};
static struct ctl_table sd_ctl_root[] = {
{
+ .ctl_name = CTL_KERN,
.procname = "kernel",
- .mode = 0755,
+ .mode = 0555,
.child = sd_ctl_dir,
},
{0,},
@@ -5307,7 +5308,7 @@ static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
for_each_domain(cpu, sd) {
snprintf(buf, 32, "domain%d", i);
entry->procname = kstrdup(buf, GFP_KERNEL);
- entry->mode = 0755;
+ entry->mode = 0555;
entry->child = sd_alloc_ctl_domain_table(sd);
entry++;
i++;
@@ -5327,7 +5328,7 @@ static void init_sched_domain_sysctl(void)
for (i = 0; i < cpu_num; i++, entry++) {
snprintf(buf, 32, "cpu%d", i);
entry->procname = kstrdup(buf, GFP_KERNEL);
- entry->mode = 0755;
+ entry->mode = 0555;
entry->child = sd_alloc_ctl_cpu_table(i);
}
sd_sysctl_header = register_sysctl_table(sd_ctl_root);
--
1.5.1.1.181.g2de0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- [PATCH 6/7] sysctl: Update sysctl_checks list of binary paths.
- From: Eric W. Biederman
- [PATCH 6/7] sysctl: Update sysctl_checks list of binary paths.
- References:
- 2.6.23-rc2-mm2
- From: Andrew Morton
- Re: 2.6.23-rc2-mm2
- From: Michal Piotrowski
- Re: 2.6.23-rc2-mm2
- From: Gabriel C
- Re: 2.6.23-rc2-mm2
- From: Eric W. Biederman
- Re: 2.6.23-rc2-mm2
- From: Andrew Morton
- [PATCH 1/7] sysctl: Remove broken cdrom binary sysctls
- From: Eric W. Biederman
- [PATCH 2/7] sysctl: parport remove binary paths.
- From: Eric W. Biederman
- [PATCH 3/7] sysctl: Simplify the pty sysctl logic.
- From: Eric W. Biederman
- [PATCH 4/7] sysctl: remove broken netfilter binary sysctls
- From: Eric W. Biederman
- 2.6.23-rc2-mm2
- Prev by Date: Re: Driver writer hints (was [PATCH 3/4] Add ETHTOOL_[GS]PFLAGS sub-ioctls)
- Next by Date: [PATCH 6/7] sysctl: Update sysctl_checks list of binary paths.
- Previous by thread: [PATCH 4/7] sysctl: remove broken netfilter binary sysctls
- Next by thread: [PATCH 6/7] sysctl: Update sysctl_checks list of binary paths.
- Index(es):
Relevant Pages
|