aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/debug/debug_core.c5
-rw-r--r--kernel/debug/debug_core.h2
-rw-r--r--kernel/hung_task.c6
-rw-r--r--kernel/sysctl.c7
4 files changed, 12 insertions, 8 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index 7d2f35e5df2f..334b3980ffc1 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -736,7 +736,8 @@ int kgdb_nmicallback(int cpu, void *regs)
736 return 1; 736 return 1;
737} 737}
738 738
739int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready) 739int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code,
740 atomic_t *send_ready)
740{ 741{
741#ifdef CONFIG_SMP 742#ifdef CONFIG_SMP
742 if (!kgdb_io_ready(0) || !send_ready) 743 if (!kgdb_io_ready(0) || !send_ready)
@@ -750,7 +751,7 @@ int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready)
750 ks->cpu = cpu; 751 ks->cpu = cpu;
751 ks->ex_vector = trapnr; 752 ks->ex_vector = trapnr;
752 ks->signo = SIGTRAP; 753 ks->signo = SIGTRAP;
753 ks->err_code = KGDB_KDB_REASON_SYSTEM_NMI; 754 ks->err_code = err_code;
754 ks->linux_regs = regs; 755 ks->linux_regs = regs;
755 ks->send_ready = send_ready; 756 ks->send_ready = send_ready;
756 kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); 757 kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER);
diff --git a/kernel/debug/debug_core.h b/kernel/debug/debug_core.h
index 572aa4f5677c..127d9bc49fb4 100644
--- a/kernel/debug/debug_core.h
+++ b/kernel/debug/debug_core.h
@@ -75,13 +75,11 @@ extern int kdb_stub(struct kgdb_state *ks);
75extern int kdb_parse(const char *cmdstr); 75extern int kdb_parse(const char *cmdstr);
76extern int kdb_common_init_state(struct kgdb_state *ks); 76extern int kdb_common_init_state(struct kgdb_state *ks);
77extern int kdb_common_deinit_state(void); 77extern int kdb_common_deinit_state(void);
78#define KGDB_KDB_REASON_SYSTEM_NMI KDB_REASON_SYSTEM_NMI
79#else /* ! CONFIG_KGDB_KDB */ 78#else /* ! CONFIG_KGDB_KDB */
80static inline int kdb_stub(struct kgdb_state *ks) 79static inline int kdb_stub(struct kgdb_state *ks)
81{ 80{
82 return DBG_PASS_EVENT; 81 return DBG_PASS_EVENT;
83} 82}
84#define KGDB_KDB_REASON_SYSTEM_NMI 0
85#endif /* CONFIG_KGDB_KDB */ 83#endif /* CONFIG_KGDB_KDB */
86 84
87#endif /* _DEBUG_CORE_H_ */ 85#endif /* _DEBUG_CORE_H_ */
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 9328b80eaf14..0b9c169d577f 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -37,7 +37,7 @@ int __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
37 */ 37 */
38unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT; 38unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT;
39 39
40unsigned long __read_mostly sysctl_hung_task_warnings = 10; 40int __read_mostly sysctl_hung_task_warnings = 10;
41 41
42static int __read_mostly did_panic; 42static int __read_mostly did_panic;
43 43
@@ -98,7 +98,9 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
98 98
99 if (!sysctl_hung_task_warnings) 99 if (!sysctl_hung_task_warnings)
100 return; 100 return;
101 sysctl_hung_task_warnings--; 101
102 if (sysctl_hung_task_warnings > 0)
103 sysctl_hung_task_warnings--;
102 104
103 /* 105 /*
104 * Ok, the task did not get scheduled for more than 2 minutes, 106 * Ok, the task did not get scheduled for more than 2 minutes,
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 096db7452cbd..49e13e1f8fe6 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -121,6 +121,8 @@ extern int blk_iopoll_enabled;
121static int sixty = 60; 121static int sixty = 60;
122#endif 122#endif
123 123
124static int __maybe_unused neg_one = -1;
125
124static int zero; 126static int zero;
125static int __maybe_unused one = 1; 127static int __maybe_unused one = 1;
126static int __maybe_unused two = 2; 128static int __maybe_unused two = 2;
@@ -997,9 +999,10 @@ static struct ctl_table kern_table[] = {
997 { 999 {
998 .procname = "hung_task_warnings", 1000 .procname = "hung_task_warnings",
999 .data = &sysctl_hung_task_warnings, 1001 .data = &sysctl_hung_task_warnings,
1000 .maxlen = sizeof(unsigned long), 1002 .maxlen = sizeof(int),
1001 .mode = 0644, 1003 .mode = 0644,
1002 .proc_handler = proc_doulongvec_minmax, 1004 .proc_handler = proc_dointvec_minmax,
1005 .extra1 = &neg_one,
1003 }, 1006 },
1004#endif 1007#endif
1005#ifdef CONFIG_COMPAT 1008#ifdef CONFIG_COMPAT