diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 34a604726d0b..096db7452cbd 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. */ |
98 | extern int sysctl_overcommit_memory; | ||
99 | extern int sysctl_overcommit_ratio; | ||
100 | extern int max_threads; | 99 | extern int max_threads; |
101 | extern int suid_dumpable; | 100 | extern int suid_dumpable; |
102 | #ifdef CONFIG_COREDUMP | 101 | #ifdef CONFIG_COREDUMP |
@@ -385,19 +384,21 @@ static struct ctl_table kern_table[] = { | |||
385 | .proc_handler = proc_dointvec, | 384 | .proc_handler = proc_dointvec, |
386 | }, | 385 | }, |
387 | { | 386 | { |
388 | .procname = "numa_balancing_settle_count", | ||
389 | .data = &sysctl_numa_balancing_settle_count, | ||
390 | .maxlen = sizeof(unsigned int), | ||
391 | .mode = 0644, | ||
392 | .proc_handler = proc_dointvec, | ||
393 | }, | ||
394 | { | ||
395 | .procname = "numa_balancing_migrate_deferred", | 387 | .procname = "numa_balancing_migrate_deferred", |
396 | .data = &sysctl_numa_balancing_migrate_deferred, | 388 | .data = &sysctl_numa_balancing_migrate_deferred, |
397 | .maxlen = sizeof(unsigned int), | 389 | .maxlen = sizeof(unsigned int), |
398 | .mode = 0644, | 390 | .mode = 0644, |
399 | .proc_handler = proc_dointvec, | 391 | .proc_handler = proc_dointvec, |
400 | }, | 392 | }, |
393 | { | ||
394 | .procname = "numa_balancing", | ||
395 | .data = NULL, /* filled in by handler */ | ||
396 | .maxlen = sizeof(unsigned int), | ||
397 | .mode = 0644, | ||
398 | .proc_handler = sysctl_numa_balancing, | ||
399 | .extra1 = &zero, | ||
400 | .extra2 = &one, | ||
401 | }, | ||
401 | #endif /* CONFIG_NUMA_BALANCING */ | 402 | #endif /* CONFIG_NUMA_BALANCING */ |
402 | #endif /* CONFIG_SCHED_DEBUG */ | 403 | #endif /* CONFIG_SCHED_DEBUG */ |
403 | { | 404 | { |
@@ -614,6 +615,18 @@ static struct ctl_table kern_table[] = { | |||
614 | .proc_handler = proc_dointvec, | 615 | .proc_handler = proc_dointvec, |
615 | }, | 616 | }, |
616 | #endif | 617 | #endif |
618 | #ifdef CONFIG_KEXEC | ||
619 | { | ||
620 | .procname = "kexec_load_disabled", | ||
621 | .data = &kexec_load_disabled, | ||
622 | .maxlen = sizeof(int), | ||
623 | .mode = 0644, | ||
624 | /* only handle a transition from default "0" to "1" */ | ||
625 | .proc_handler = proc_dointvec_minmax, | ||
626 | .extra1 = &one, | ||
627 | .extra2 = &one, | ||
628 | }, | ||
629 | #endif | ||
617 | #ifdef CONFIG_MODULES | 630 | #ifdef CONFIG_MODULES |
618 | { | 631 | { |
619 | .procname = "modprobe", | 632 | .procname = "modprobe", |
@@ -1128,7 +1141,14 @@ static struct ctl_table vm_table[] = { | |||
1128 | .data = &sysctl_overcommit_ratio, | 1141 | .data = &sysctl_overcommit_ratio, |
1129 | .maxlen = sizeof(sysctl_overcommit_ratio), | 1142 | .maxlen = sizeof(sysctl_overcommit_ratio), |
1130 | .mode = 0644, | 1143 | .mode = 0644, |
1131 | .proc_handler = proc_dointvec, | 1144 | .proc_handler = overcommit_ratio_handler, |
1145 | }, | ||
1146 | { | ||
1147 | .procname = "overcommit_kbytes", | ||
1148 | .data = &sysctl_overcommit_kbytes, | ||
1149 | .maxlen = sizeof(sysctl_overcommit_kbytes), | ||
1150 | .mode = 0644, | ||
1151 | .proc_handler = overcommit_kbytes_handler, | ||
1132 | }, | 1152 | }, |
1133 | { | 1153 | { |
1134 | .procname = "page-cluster", | 1154 | .procname = "page-cluster", |