diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 10 | ||||
-rw-r--r-- | kernel/sysctl.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 39d122753bac..ef8156a6aad5 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -255,6 +255,16 @@ flush_signal_handlers(struct task_struct *t, int force_default) | |||
255 | } | 255 | } |
256 | } | 256 | } |
257 | 257 | ||
258 | int unhandled_signal(struct task_struct *tsk, int sig) | ||
259 | { | ||
260 | if (is_init(tsk)) | ||
261 | return 1; | ||
262 | if (tsk->ptrace & PT_PTRACED) | ||
263 | return 0; | ||
264 | return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) || | ||
265 | (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL); | ||
266 | } | ||
267 | |||
258 | 268 | ||
259 | /* Notify the system that a driver wants to block all signals for this | 269 | /* Notify the system that a driver wants to block all signals for this |
260 | * process, and wants to be notified if any signals at all were to be | 270 | * process, and wants to be notified if any signals at all were to be |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 222299844ad1..ddebf3f2affe 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1203,6 +1203,16 @@ static ctl_table fs_table[] = { | |||
1203 | }; | 1203 | }; |
1204 | 1204 | ||
1205 | static ctl_table debug_table[] = { | 1205 | static ctl_table debug_table[] = { |
1206 | #ifdef CONFIG_X86 | ||
1207 | { | ||
1208 | .ctl_name = CTL_UNNUMBERED, | ||
1209 | .procname = "exception-trace", | ||
1210 | .data = &show_unhandled_signals, | ||
1211 | .maxlen = sizeof(int), | ||
1212 | .mode = 0644, | ||
1213 | .proc_handler = proc_dointvec | ||
1214 | }, | ||
1215 | #endif | ||
1206 | { .ctl_name = 0 } | 1216 | { .ctl_name = 0 } |
1207 | }; | 1217 | }; |
1208 | 1218 | ||