diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index fe30db7bdb0a..ca38e8e3e907 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -51,10 +51,10 @@ | |||
51 | #include <linux/acpi.h> | 51 | #include <linux/acpi.h> |
52 | #include <linux/reboot.h> | 52 | #include <linux/reboot.h> |
53 | #include <linux/ftrace.h> | 53 | #include <linux/ftrace.h> |
54 | #include <linux/slow-work.h> | ||
55 | #include <linux/perf_event.h> | 54 | #include <linux/perf_event.h> |
56 | #include <linux/kprobes.h> | 55 | #include <linux/kprobes.h> |
57 | #include <linux/pipe_fs_i.h> | 56 | #include <linux/pipe_fs_i.h> |
57 | #include <linux/oom.h> | ||
58 | 58 | ||
59 | #include <asm/uaccess.h> | 59 | #include <asm/uaccess.h> |
60 | #include <asm/processor.h> | 60 | #include <asm/processor.h> |
@@ -77,15 +77,16 @@ | |||
77 | #include <scsi/sg.h> | 77 | #include <scsi/sg.h> |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #ifdef CONFIG_LOCKUP_DETECTOR | ||
81 | #include <linux/nmi.h> | ||
82 | #endif | ||
83 | |||
80 | 84 | ||
81 | #if defined(CONFIG_SYSCTL) | 85 | #if defined(CONFIG_SYSCTL) |
82 | 86 | ||
83 | /* External variables not in a header file. */ | 87 | /* External variables not in a header file. */ |
84 | extern int sysctl_overcommit_memory; | 88 | extern int sysctl_overcommit_memory; |
85 | extern int sysctl_overcommit_ratio; | 89 | extern int sysctl_overcommit_ratio; |
86 | extern int sysctl_panic_on_oom; | ||
87 | extern int sysctl_oom_kill_allocating_task; | ||
88 | extern int sysctl_oom_dump_tasks; | ||
89 | extern int max_threads; | 90 | extern int max_threads; |
90 | extern int core_uses_pid; | 91 | extern int core_uses_pid; |
91 | extern int suid_dumpable; | 92 | extern int suid_dumpable; |
@@ -107,7 +108,7 @@ extern int blk_iopoll_enabled; | |||
107 | #endif | 108 | #endif |
108 | 109 | ||
109 | /* Constants used for minimum and maximum */ | 110 | /* Constants used for minimum and maximum */ |
110 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 111 | #ifdef CONFIG_LOCKUP_DETECTOR |
111 | static int sixty = 60; | 112 | static int sixty = 60; |
112 | static int neg_one = -1; | 113 | static int neg_one = -1; |
113 | #endif | 114 | #endif |
@@ -563,7 +564,7 @@ static struct ctl_table kern_table[] = { | |||
563 | .extra2 = &one, | 564 | .extra2 = &one, |
564 | }, | 565 | }, |
565 | #endif | 566 | #endif |
566 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) | 567 | #ifdef CONFIG_HOTPLUG |
567 | { | 568 | { |
568 | .procname = "hotplug", | 569 | .procname = "hotplug", |
569 | .data = &uevent_helper, | 570 | .data = &uevent_helper, |
@@ -711,7 +712,34 @@ static struct ctl_table kern_table[] = { | |||
711 | .mode = 0444, | 712 | .mode = 0444, |
712 | .proc_handler = proc_dointvec, | 713 | .proc_handler = proc_dointvec, |
713 | }, | 714 | }, |
714 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) | 715 | #if defined(CONFIG_LOCKUP_DETECTOR) |
716 | { | ||
717 | .procname = "watchdog", | ||
718 | .data = &watchdog_enabled, | ||
719 | .maxlen = sizeof (int), | ||
720 | .mode = 0644, | ||
721 | .proc_handler = proc_dowatchdog_enabled, | ||
722 | }, | ||
723 | { | ||
724 | .procname = "watchdog_thresh", | ||
725 | .data = &softlockup_thresh, | ||
726 | .maxlen = sizeof(int), | ||
727 | .mode = 0644, | ||
728 | .proc_handler = proc_dowatchdog_thresh, | ||
729 | .extra1 = &neg_one, | ||
730 | .extra2 = &sixty, | ||
731 | }, | ||
732 | { | ||
733 | .procname = "softlockup_panic", | ||
734 | .data = &softlockup_panic, | ||
735 | .maxlen = sizeof(int), | ||
736 | .mode = 0644, | ||
737 | .proc_handler = proc_dointvec_minmax, | ||
738 | .extra1 = &zero, | ||
739 | .extra2 = &one, | ||
740 | }, | ||
741 | #endif | ||
742 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) && !defined(CONFIG_LOCKUP_DETECTOR) | ||
715 | { | 743 | { |
716 | .procname = "unknown_nmi_panic", | 744 | .procname = "unknown_nmi_panic", |
717 | .data = &unknown_nmi_panic, | 745 | .data = &unknown_nmi_panic, |
@@ -814,26 +842,6 @@ static struct ctl_table kern_table[] = { | |||
814 | .proc_handler = proc_dointvec, | 842 | .proc_handler = proc_dointvec, |
815 | }, | 843 | }, |
816 | #endif | 844 | #endif |
817 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
818 | { | ||
819 | .procname = "softlockup_panic", | ||
820 | .data = &softlockup_panic, | ||
821 | .maxlen = sizeof(int), | ||
822 | .mode = 0644, | ||
823 | .proc_handler = proc_dointvec_minmax, | ||
824 | .extra1 = &zero, | ||
825 | .extra2 = &one, | ||
826 | }, | ||
827 | { | ||
828 | .procname = "softlockup_thresh", | ||
829 | .data = &softlockup_thresh, | ||
830 | .maxlen = sizeof(int), | ||
831 | .mode = 0644, | ||
832 | .proc_handler = proc_dosoftlockup_thresh, | ||
833 | .extra1 = &neg_one, | ||
834 | .extra2 = &sixty, | ||
835 | }, | ||
836 | #endif | ||
837 | #ifdef CONFIG_DETECT_HUNG_TASK | 845 | #ifdef CONFIG_DETECT_HUNG_TASK |
838 | { | 846 | { |
839 | .procname = "hung_task_panic", | 847 | .procname = "hung_task_panic", |
@@ -907,13 +915,6 @@ static struct ctl_table kern_table[] = { | |||
907 | .proc_handler = proc_dointvec, | 915 | .proc_handler = proc_dointvec, |
908 | }, | 916 | }, |
909 | #endif | 917 | #endif |
910 | #ifdef CONFIG_SLOW_WORK | ||
911 | { | ||
912 | .procname = "slow-work", | ||
913 | .mode = 0555, | ||
914 | .child = slow_work_sysctls, | ||
915 | }, | ||
916 | #endif | ||
917 | #ifdef CONFIG_PERF_EVENTS | 918 | #ifdef CONFIG_PERF_EVENTS |
918 | { | 919 | { |
919 | .procname = "perf_event_paranoid", | 920 | .procname = "perf_event_paranoid", |