aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-02-02 03:45:39 -0500
committerIngo Molnar <mingo@kernel.org>2014-02-02 03:45:39 -0500
commiteaa4e4fcf1b5c60e656d93242f7fe422173f25b2 (patch)
treec05d5d6ca3f625d72a9d136b4c485d3dc9472089 /kernel/sysctl.c
parentbe1e4e760d940c14d119bffef5eb007dfdf29046 (diff)
parent5cb480f6b488128140c940abff3c36f524a334a8 (diff)
Merge branch 'linus' into sched/core, to resolve conflicts
Conflicts: kernel/sysctl.c Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c40
1 files changed, 35 insertions, 5 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index b41d61d95c14..7754ff16f334 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -62,6 +62,7 @@
62#include <linux/capability.h> 62#include <linux/capability.h>
63#include <linux/binfmts.h> 63#include <linux/binfmts.h>
64#include <linux/sched/sysctl.h> 64#include <linux/sched/sysctl.h>
65#include <linux/kexec.h>
65 66
66#include <asm/uaccess.h> 67#include <asm/uaccess.h>
67#include <asm/processor.h> 68#include <asm/processor.h>
@@ -95,8 +96,6 @@
95#if defined(CONFIG_SYSCTL) 96#if defined(CONFIG_SYSCTL)
96 97
97/* External variables not in a header file. */ 98/* External variables not in a header file. */
98extern int sysctl_overcommit_memory;
99extern int sysctl_overcommit_ratio;
100extern int max_threads; 99extern int max_threads;
101extern int suid_dumpable; 100extern int suid_dumpable;
102#ifdef CONFIG_COREDUMP 101#ifdef CONFIG_COREDUMP
@@ -122,6 +121,8 @@ extern int blk_iopoll_enabled;
122static int sixty = 60; 121static int sixty = 60;
123#endif 122#endif
124 123
124static int __maybe_unused neg_one = -1;
125
125static int zero; 126static int zero;
126static int __maybe_unused one = 1; 127static int __maybe_unused one = 1;
127static int __maybe_unused two = 2; 128static int __maybe_unused two = 2;
@@ -384,6 +385,15 @@ static struct ctl_table kern_table[] = {
384 .mode = 0644, 385 .mode = 0644,
385 .proc_handler = proc_dointvec, 386 .proc_handler = proc_dointvec,
386 }, 387 },
388 {
389 .procname = "numa_balancing",
390 .data = NULL, /* filled in by handler */
391 .maxlen = sizeof(unsigned int),
392 .mode = 0644,
393 .proc_handler = sysctl_numa_balancing,
394 .extra1 = &zero,
395 .extra2 = &one,
396 },
387#endif /* CONFIG_NUMA_BALANCING */ 397#endif /* CONFIG_NUMA_BALANCING */
388#endif /* CONFIG_SCHED_DEBUG */ 398#endif /* CONFIG_SCHED_DEBUG */
389 { 399 {
@@ -600,6 +610,18 @@ static struct ctl_table kern_table[] = {
600 .proc_handler = proc_dointvec, 610 .proc_handler = proc_dointvec,
601 }, 611 },
602#endif 612#endif
613#ifdef CONFIG_KEXEC
614 {
615 .procname = "kexec_load_disabled",
616 .data = &kexec_load_disabled,
617 .maxlen = sizeof(int),
618 .mode = 0644,
619 /* only handle a transition from default "0" to "1" */
620 .proc_handler = proc_dointvec_minmax,
621 .extra1 = &one,
622 .extra2 = &one,
623 },
624#endif
603#ifdef CONFIG_MODULES 625#ifdef CONFIG_MODULES
604 { 626 {
605 .procname = "modprobe", 627 .procname = "modprobe",
@@ -970,9 +992,10 @@ static struct ctl_table kern_table[] = {
970 { 992 {
971 .procname = "hung_task_warnings", 993 .procname = "hung_task_warnings",
972 .data = &sysctl_hung_task_warnings, 994 .data = &sysctl_hung_task_warnings,
973 .maxlen = sizeof(unsigned long), 995 .maxlen = sizeof(int),
974 .mode = 0644, 996 .mode = 0644,
975 .proc_handler = proc_doulongvec_minmax, 997 .proc_handler = proc_dointvec_minmax,
998 .extra1 = &neg_one,
976 }, 999 },
977#endif 1000#endif
978#ifdef CONFIG_COMPAT 1001#ifdef CONFIG_COMPAT
@@ -1114,7 +1137,14 @@ static struct ctl_table vm_table[] = {
1114 .data = &sysctl_overcommit_ratio, 1137 .data = &sysctl_overcommit_ratio,
1115 .maxlen = sizeof(sysctl_overcommit_ratio), 1138 .maxlen = sizeof(sysctl_overcommit_ratio),
1116 .mode = 0644, 1139 .mode = 0644,
1117 .proc_handler = proc_dointvec, 1140 .proc_handler = overcommit_ratio_handler,
1141 },
1142 {
1143 .procname = "overcommit_kbytes",
1144 .data = &sysctl_overcommit_kbytes,
1145 .maxlen = sizeof(sysctl_overcommit_kbytes),
1146 .mode = 0644,
1147 .proc_handler = overcommit_kbytes_handler,
1118 }, 1148 },
1119 { 1149 {
1120 .procname = "page-cluster", 1150 .procname = "page-cluster",