summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
commitb9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch)
tree42d07b0c7246ae2536a702e7c5de9e2732341116 /kernel/sysctl.c
parent7406b0a326f2d70ade2671c37d1beef62249db97 (diff)
Merge with 2.3.99-pre6.
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 35883ed4c..5137a8e90 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -228,7 +228,7 @@ static ctl_table kern_table[] = {
static ctl_table vm_table[] = {
{VM_FREEPG, "freepages",
&freepages, sizeof(freepages_t), 0644, NULL, &proc_dointvec},
- {VM_BDFLUSH, "bdflush", &bdf_prm, 9*sizeof(int), 0600, NULL,
+ {VM_BDFLUSH, "bdflush", &bdf_prm, 9*sizeof(int), 0644, NULL,
&proc_dointvec_minmax, &sysctl_intvec, NULL,
&bdflush_min, &bdflush_max},
{VM_OVERCOMMIT_MEMORY, "overcommit_memory", &sysctl_overcommit_memory,
@@ -240,9 +240,9 @@ static ctl_table vm_table[] = {
{VM_PAGERDAEMON, "kswapd",
&pager_daemon, sizeof(pager_daemon_t), 0644, NULL, &proc_dointvec},
{VM_PGT_CACHE, "pagetable_cache",
- &pgt_cache_water, 2*sizeof(int), 0600, NULL, &proc_dointvec},
+ &pgt_cache_water, 2*sizeof(int), 0644, NULL, &proc_dointvec},
{VM_PAGE_CLUSTER, "page-cluster",
- &page_cluster, sizeof(int), 0600, NULL, &proc_dointvec},
+ &page_cluster, sizeof(int), 0644, NULL, &proc_dointvec},
{0}
};
@@ -320,6 +320,7 @@ int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
kfree(context);
if (error != -ENOTDIR)
return error;
+ tmp = tmp->next;
} while (tmp != &root_table_header.ctl_entry);
return -ENOTDIR;
}
@@ -365,14 +366,13 @@ static int parse_table(int *name, int nlen,
void *newval, size_t newlen,
ctl_table *table, void **context)
{
+ int n;
repeat:
if (!nlen)
return -ENOTDIR;
-
+ if (get_user(n, name))
+ return -EFAULT;
for ( ; table->ctl_name; table++) {
- int n;
- if (get_user(n, name))
- return -EFAULT;
if (n == table->ctl_name || table->ctl_name == CTL_ANY) {
int error;
if (table->child) {