diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 5e63de0f9ee2..dde3d53e8adc 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -80,6 +80,19 @@ extern int maps_protect; | |||
80 | extern int sysctl_stat_interval; | 80 | extern int sysctl_stat_interval; |
81 | extern int audit_argv_kb; | 81 | extern int audit_argv_kb; |
82 | 82 | ||
83 | /* Constants used for minimum and maximum */ | ||
84 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
85 | static int one = 1; | ||
86 | static int sixty = 60; | ||
87 | #endif | ||
88 | |||
89 | #ifdef CONFIG_MMU | ||
90 | static int two = 2; | ||
91 | #endif | ||
92 | |||
93 | static int zero; | ||
94 | static int one_hundred = 100; | ||
95 | |||
83 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 96 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ |
84 | static int maxolduid = 65535; | 97 | static int maxolduid = 65535; |
85 | static int minolduid; | 98 | static int minolduid; |
@@ -711,6 +724,19 @@ static ctl_table kern_table[] = { | |||
711 | .proc_handler = &proc_dointvec, | 724 | .proc_handler = &proc_dointvec, |
712 | }, | 725 | }, |
713 | #endif | 726 | #endif |
727 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
728 | { | ||
729 | .ctl_name = CTL_UNNUMBERED, | ||
730 | .procname = "softlockup_thresh", | ||
731 | .data = &softlockup_thresh, | ||
732 | .maxlen = sizeof(int), | ||
733 | .mode = 0644, | ||
734 | .proc_handler = &proc_dointvec_minmax, | ||
735 | .strategy = &sysctl_intvec, | ||
736 | .extra1 = &one, | ||
737 | .extra2 = &sixty, | ||
738 | }, | ||
739 | #endif | ||
714 | #ifdef CONFIG_COMPAT | 740 | #ifdef CONFIG_COMPAT |
715 | { | 741 | { |
716 | .ctl_name = KERN_COMPAT_LOG, | 742 | .ctl_name = KERN_COMPAT_LOG, |
@@ -757,13 +783,6 @@ static ctl_table kern_table[] = { | |||
757 | { .ctl_name = 0 } | 783 | { .ctl_name = 0 } |
758 | }; | 784 | }; |
759 | 785 | ||
760 | /* Constants for minimum and maximum testing in vm_table. | ||
761 | We use these as one-element integer vectors. */ | ||
762 | static int zero; | ||
763 | static int two = 2; | ||
764 | static int one_hundred = 100; | ||
765 | |||
766 | |||
767 | static ctl_table vm_table[] = { | 786 | static ctl_table vm_table[] = { |
768 | { | 787 | { |
769 | .ctl_name = VM_OVERCOMMIT_MEMORY, | 788 | .ctl_name = VM_OVERCOMMIT_MEMORY, |