aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c42
1 files changed, 29 insertions, 13 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5e2ad5bf88e2..d41ef6b4cf72 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -37,7 +37,6 @@
37#include <linux/highuid.h> 37#include <linux/highuid.h>
38#include <linux/writeback.h> 38#include <linux/writeback.h>
39#include <linux/hugetlb.h> 39#include <linux/hugetlb.h>
40#include <linux/security.h>
41#include <linux/initrd.h> 40#include <linux/initrd.h>
42#include <linux/times.h> 41#include <linux/times.h>
43#include <linux/limits.h> 42#include <linux/limits.h>
@@ -67,14 +66,13 @@ extern int sysctl_overcommit_memory;
67extern int sysctl_overcommit_ratio; 66extern int sysctl_overcommit_ratio;
68extern int sysctl_panic_on_oom; 67extern int sysctl_panic_on_oom;
69extern int sysctl_oom_kill_allocating_task; 68extern int sysctl_oom_kill_allocating_task;
69extern int sysctl_oom_dump_tasks;
70extern int max_threads; 70extern int max_threads;
71extern int core_uses_pid; 71extern int core_uses_pid;
72extern int suid_dumpable; 72extern int suid_dumpable;
73extern char core_pattern[]; 73extern char core_pattern[];
74extern int pid_max; 74extern int pid_max;
75extern int min_free_kbytes; 75extern int min_free_kbytes;
76extern int printk_ratelimit_jiffies;
77extern int printk_ratelimit_burst;
78extern int pid_max_min, pid_max_max; 76extern int pid_max_min, pid_max_max;
79extern int sysctl_drop_caches; 77extern int sysctl_drop_caches;
80extern int percpu_pagelist_fraction; 78extern int percpu_pagelist_fraction;
@@ -490,14 +488,6 @@ static struct ctl_table kern_table[] = {
490 .mode = 0644, 488 .mode = 0644,
491 .proc_handler = &proc_dointvec, 489 .proc_handler = &proc_dointvec,
492 }, 490 },
493 {
494 .ctl_name = KERN_PRINTK,
495 .procname = "printk",
496 .data = &console_loglevel,
497 .maxlen = 4*sizeof(int),
498 .mode = 0644,
499 .proc_handler = &proc_dointvec,
500 },
501#ifdef CONFIG_KMOD 491#ifdef CONFIG_KMOD
502 { 492 {
503 .ctl_name = KERN_MODPROBE, 493 .ctl_name = KERN_MODPROBE,
@@ -644,6 +634,15 @@ static struct ctl_table kern_table[] = {
644 .mode = 0644, 634 .mode = 0644,
645 .proc_handler = &proc_dointvec, 635 .proc_handler = &proc_dointvec,
646 }, 636 },
637#if defined CONFIG_PRINTK
638 {
639 .ctl_name = KERN_PRINTK,
640 .procname = "printk",
641 .data = &console_loglevel,
642 .maxlen = 4*sizeof(int),
643 .mode = 0644,
644 .proc_handler = &proc_dointvec,
645 },
647 { 646 {
648 .ctl_name = KERN_PRINTK_RATELIMIT, 647 .ctl_name = KERN_PRINTK_RATELIMIT,
649 .procname = "printk_ratelimit", 648 .procname = "printk_ratelimit",
@@ -661,6 +660,7 @@ static struct ctl_table kern_table[] = {
661 .mode = 0644, 660 .mode = 0644,
662 .proc_handler = &proc_dointvec, 661 .proc_handler = &proc_dointvec,
663 }, 662 },
663#endif
664 { 664 {
665 .ctl_name = KERN_NGROUPS_MAX, 665 .ctl_name = KERN_NGROUPS_MAX,
666 .procname = "ngroups_max", 666 .procname = "ngroups_max",
@@ -871,6 +871,14 @@ static struct ctl_table vm_table[] = {
871 .proc_handler = &proc_dointvec, 871 .proc_handler = &proc_dointvec,
872 }, 872 },
873 { 873 {
874 .ctl_name = CTL_UNNUMBERED,
875 .procname = "oom_dump_tasks",
876 .data = &sysctl_oom_dump_tasks,
877 .maxlen = sizeof(sysctl_oom_dump_tasks),
878 .mode = 0644,
879 .proc_handler = &proc_dointvec,
880 },
881 {
874 .ctl_name = VM_OVERCOMMIT_RATIO, 882 .ctl_name = VM_OVERCOMMIT_RATIO,
875 .procname = "overcommit_ratio", 883 .procname = "overcommit_ratio",
876 .data = &sysctl_overcommit_ratio, 884 .data = &sysctl_overcommit_ratio,
@@ -973,7 +981,7 @@ static struct ctl_table vm_table[] = {
973 .data = &nr_overcommit_huge_pages, 981 .data = &nr_overcommit_huge_pages,
974 .maxlen = sizeof(nr_overcommit_huge_pages), 982 .maxlen = sizeof(nr_overcommit_huge_pages),
975 .mode = 0644, 983 .mode = 0644,
976 .proc_handler = &proc_doulongvec_minmax, 984 .proc_handler = &hugetlb_overcommit_handler,
977 }, 985 },
978#endif 986#endif
979 { 987 {
@@ -1203,6 +1211,14 @@ static struct ctl_table fs_table[] = {
1203 .proc_handler = &proc_dointvec, 1211 .proc_handler = &proc_dointvec,
1204 }, 1212 },
1205 { 1213 {
1214 .ctl_name = CTL_UNNUMBERED,
1215 .procname = "nr_open",
1216 .data = &sysctl_nr_open,
1217 .maxlen = sizeof(int),
1218 .mode = 0644,
1219 .proc_handler = &proc_dointvec,
1220 },
1221 {
1206 .ctl_name = FS_DENTRY, 1222 .ctl_name = FS_DENTRY,
1207 .procname = "dentry-state", 1223 .procname = "dentry-state",
1208 .data = &dentry_stat, 1224 .data = &dentry_stat,
@@ -2471,7 +2487,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp
2471 pid_t tmp; 2487 pid_t tmp;
2472 int r; 2488 int r;
2473 2489
2474 tmp = pid_nr_ns(cad_pid, current->nsproxy->pid_ns); 2490 tmp = pid_vnr(cad_pid);
2475 2491
2476 r = __do_proc_dointvec(&tmp, table, write, filp, buffer, 2492 r = __do_proc_dointvec(&tmp, table, write, filp, buffer,
2477 lenp, ppos, NULL, NULL); 2493 lenp, ppos, NULL, NULL);