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