Conflicts: kernel/sysctl.c
Showing the changes to kernel/sysctl.c (1 of 9040 files). Show all
Unified · Split
| @@ -62,6 +62,7 @@ · 61 unmodified lines | ||
| 62 | 62 | #include <linux/capability.h> |
| 63 | 63 | #include <linux/binfmts.h> |
| 64 | 64 | #include <linux/sched/sysctl.h> |
| 65 | +#include <linux/kexec.h> | |
| 65 | 66 | |
| 66 | 67 | #include <asm/uaccess.h> |
| 67 | 68 | #include <asm/processor.h> |
| @@ -95,8 +96,6 @@ · 27 unmodified lines | ||
| 95 | 96 | #if defined(CONFIG_SYSCTL) |
| 96 | 97 | |
| 97 | 98 | /* External variables not in a header file. */ |
| 98 | −extern int sysctl_overcommit_memory; | |
| 99 | −extern int sysctl_overcommit_ratio; | |
| 100 | 99 | extern int max_threads; |
| 101 | 100 | extern int suid_dumpable; |
| 102 | 101 | #ifdef CONFIG_COREDUMP |
| @@ -122,6 +121,8 @@ extern int blk_iopoll_enabled; · 19 unmodified lines | ||
| 122 | 121 | static int sixty = 60; |
| 123 | 122 | #endif |
| 124 | 123 | |
| 124 | +static int __maybe_unused neg_one = -1; | |
| 125 | + | |
| 125 | 126 | static int zero; |
| 126 | 127 | static int __maybe_unused one = 1; |
| 127 | 128 | static int __maybe_unused two = 2; |
| @@ -384,6 +385,15 @@ static struct ctl_table kern_table[] = { · 256 unmodified lines | ||
| 384 | 385 | .mode = 0644, |
| 385 | 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 | 397 | #endif /* CONFIG_NUMA_BALANCING */ |
| 388 | 398 | #endif /* CONFIG_SCHED_DEBUG */ |
| 389 | 399 | { |
| @@ -600,6 +610,18 @@ static struct ctl_table kern_table[] = { · 210 unmodified lines | ||
| 600 | 610 | .proc_handler = proc_dointvec, |
| 601 | 611 | }, |
| 602 | 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 | 625 | #ifdef CONFIG_MODULES |
| 604 | 626 | { |
| 605 | 627 | .procname = "modprobe", |
| @@ -970,9 +992,10 @@ static struct ctl_table kern_table[] = { · 364 unmodified lines | ||
| 970 | 992 | { |
| 971 | 993 | .procname = "hung_task_warnings", |
| 972 | 994 | .data = &sysctl_hung_task_warnings, |
| 973 | − .maxlen = sizeof(unsigned long), | |
| 995 | + .maxlen = sizeof(int), | |
| 974 | 996 | .mode = 0644, |
| 975 | − .proc_handler = proc_doulongvec_minmax, | |
| 997 | + .proc_handler = proc_dointvec_minmax, | |
| 998 | + .extra1 = &neg_one, | |
| 976 | 999 | }, |
| 977 | 1000 | #endif |
| 978 | 1001 | #ifdef CONFIG_COMPAT |
| @@ -1114,7 +1137,14 @@ static struct ctl_table vm_table[] = { · 135 unmodified lines | ||
| 1114 | 1137 | .data = &sysctl_overcommit_ratio, |
| 1115 | 1138 | .maxlen = sizeof(sysctl_overcommit_ratio), |
| 1116 | 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 | 1150 | .procname = "page-cluster", |