aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c64
1 files changed, 53 insertions, 11 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 2e490a389dd2..4286b62b34a0 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -48,6 +48,7 @@
48#include <linux/acpi.h> 48#include <linux/acpi.h>
49#include <linux/reboot.h> 49#include <linux/reboot.h>
50#include <linux/ftrace.h> 50#include <linux/ftrace.h>
51#include <linux/slow-work.h>
51 52
52#include <asm/uaccess.h> 53#include <asm/uaccess.h>
53#include <asm/processor.h> 54#include <asm/processor.h>
@@ -95,14 +96,12 @@ static int sixty = 60;
95static int neg_one = -1; 96static int neg_one = -1;
96#endif 97#endif
97 98
98#if defined(CONFIG_MMU) && defined(CONFIG_FILE_LOCKING)
99static int two = 2;
100#endif
101
102static int zero; 99static int zero;
103static int one = 1; 100static int __maybe_unused one = 1;
101static int __maybe_unused two = 2;
104static unsigned long one_ul = 1; 102static unsigned long one_ul = 1;
105static int one_hundred = 100; 103static int one_hundred = 100;
104static int one_thousand = 1000;
106 105
107/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ 106/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
108static int maxolduid = 65535; 107static int maxolduid = 65535;
@@ -815,6 +814,19 @@ static struct ctl_table kern_table[] = {
815 .extra1 = &neg_one, 814 .extra1 = &neg_one,
816 .extra2 = &sixty, 815 .extra2 = &sixty,
817 }, 816 },
817#endif
818#ifdef CONFIG_DETECT_HUNG_TASK
819 {
820 .ctl_name = CTL_UNNUMBERED,
821 .procname = "hung_task_panic",
822 .data = &sysctl_hung_task_panic,
823 .maxlen = sizeof(int),
824 .mode = 0644,
825 .proc_handler = &proc_dointvec_minmax,
826 .strategy = &sysctl_intvec,
827 .extra1 = &zero,
828 .extra2 = &one,
829 },
818 { 830 {
819 .ctl_name = CTL_UNNUMBERED, 831 .ctl_name = CTL_UNNUMBERED,
820 .procname = "hung_task_check_count", 832 .procname = "hung_task_check_count",
@@ -830,7 +842,7 @@ static struct ctl_table kern_table[] = {
830 .data = &sysctl_hung_task_timeout_secs, 842 .data = &sysctl_hung_task_timeout_secs,
831 .maxlen = sizeof(unsigned long), 843 .maxlen = sizeof(unsigned long),
832 .mode = 0644, 844 .mode = 0644,
833 .proc_handler = &proc_doulongvec_minmax, 845 .proc_handler = &proc_dohung_task_timeout_secs,
834 .strategy = &sysctl_intvec, 846 .strategy = &sysctl_intvec,
835 }, 847 },
836 { 848 {
@@ -900,6 +912,14 @@ static struct ctl_table kern_table[] = {
900 .proc_handler = &scan_unevictable_handler, 912 .proc_handler = &scan_unevictable_handler,
901 }, 913 },
902#endif 914#endif
915#ifdef CONFIG_SLOW_WORK
916 {
917 .ctl_name = CTL_UNNUMBERED,
918 .procname = "slow-work",
919 .mode = 0555,
920 .child = slow_work_sysctls,
921 },
922#endif
903/* 923/*
904 * NOTE: do not add new entries to this table unless you have read 924 * NOTE: do not add new entries to this table unless you have read
905 * Documentation/sysctl/ctl_unnumbered.txt 925 * Documentation/sysctl/ctl_unnumbered.txt
@@ -1021,6 +1041,28 @@ static struct ctl_table vm_table[] = {
1021 .proc_handler = &proc_dointvec, 1041 .proc_handler = &proc_dointvec,
1022 }, 1042 },
1023 { 1043 {
1044 .ctl_name = CTL_UNNUMBERED,
1045 .procname = "nr_pdflush_threads_min",
1046 .data = &nr_pdflush_threads_min,
1047 .maxlen = sizeof nr_pdflush_threads_min,
1048 .mode = 0644 /* read-write */,
1049 .proc_handler = &proc_dointvec_minmax,
1050 .strategy = &sysctl_intvec,
1051 .extra1 = &one,
1052 .extra2 = &nr_pdflush_threads_max,
1053 },
1054 {
1055 .ctl_name = CTL_UNNUMBERED,
1056 .procname = "nr_pdflush_threads_max",
1057 .data = &nr_pdflush_threads_max,
1058 .maxlen = sizeof nr_pdflush_threads_max,
1059 .mode = 0644 /* read-write */,
1060 .proc_handler = &proc_dointvec_minmax,
1061 .strategy = &sysctl_intvec,
1062 .extra1 = &nr_pdflush_threads_min,
1063 .extra2 = &one_thousand,
1064 },
1065 {
1024 .ctl_name = VM_SWAPPINESS, 1066 .ctl_name = VM_SWAPPINESS,
1025 .procname = "swappiness", 1067 .procname = "swappiness",
1026 .data = &vm_swappiness, 1068 .data = &vm_swappiness,
@@ -1373,10 +1415,7 @@ static struct ctl_table fs_table[] = {
1373 .data = &lease_break_time, 1415 .data = &lease_break_time,
1374 .maxlen = sizeof(int), 1416 .maxlen = sizeof(int),
1375 .mode = 0644, 1417 .mode = 0644,
1376 .proc_handler = &proc_dointvec_minmax, 1418 .proc_handler = &proc_dointvec,
1377 .strategy = &sysctl_intvec,
1378 .extra1 = &zero,
1379 .extra2 = &two,
1380 }, 1419 },
1381#endif 1420#endif
1382#ifdef CONFIG_AIO 1421#ifdef CONFIG_AIO
@@ -1417,7 +1456,10 @@ static struct ctl_table fs_table[] = {
1417 .data = &suid_dumpable, 1456 .data = &suid_dumpable,
1418 .maxlen = sizeof(int), 1457 .maxlen = sizeof(int),
1419 .mode = 0644, 1458 .mode = 0644,
1420 .proc_handler = &proc_dointvec, 1459 .proc_handler = &proc_dointvec_minmax,
1460 .strategy = &sysctl_intvec,
1461 .extra1 = &zero,
1462 .extra2 = &two,
1421 }, 1463 },
1422#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE) 1464#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
1423 { 1465 {