diff options
Diffstat (limited to 'kernel/signal.c')
| -rw-r--r-- | kernel/signal.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index be4f856d52f8..0af8868525d6 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
| 18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
| 19 | #include <linux/binfmts.h> | 19 | #include <linux/binfmts.h> |
| 20 | #include <linux/coredump.h> | ||
| 20 | #include <linux/security.h> | 21 | #include <linux/security.h> |
| 21 | #include <linux/syscalls.h> | 22 | #include <linux/syscalls.h> |
| 22 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
| @@ -1971,13 +1972,8 @@ static void ptrace_do_notify(int signr, int exit_code, int why) | |||
| 1971 | void ptrace_notify(int exit_code) | 1972 | void ptrace_notify(int exit_code) |
| 1972 | { | 1973 | { |
| 1973 | BUG_ON((exit_code & (0x7f | ~0xffff)) != SIGTRAP); | 1974 | BUG_ON((exit_code & (0x7f | ~0xffff)) != SIGTRAP); |
| 1974 | if (unlikely(current->task_works)) { | 1975 | if (unlikely(current->task_works)) |
| 1975 | if (test_and_clear_ti_thread_flag(current_thread_info(), | 1976 | task_work_run(); |
| 1976 | TIF_NOTIFY_RESUME)) { | ||
| 1977 | smp_mb__after_clear_bit(); | ||
| 1978 | task_work_run(); | ||
| 1979 | } | ||
| 1980 | } | ||
| 1981 | 1977 | ||
| 1982 | spin_lock_irq(¤t->sighand->siglock); | 1978 | spin_lock_irq(¤t->sighand->siglock); |
| 1983 | ptrace_do_notify(SIGTRAP, exit_code, CLD_TRAPPED); | 1979 | ptrace_do_notify(SIGTRAP, exit_code, CLD_TRAPPED); |
| @@ -2198,13 +2194,8 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, | |||
| 2198 | struct signal_struct *signal = current->signal; | 2194 | struct signal_struct *signal = current->signal; |
| 2199 | int signr; | 2195 | int signr; |
| 2200 | 2196 | ||
| 2201 | if (unlikely(current->task_works)) { | 2197 | if (unlikely(current->task_works)) |
| 2202 | if (test_and_clear_ti_thread_flag(current_thread_info(), | 2198 | task_work_run(); |
| 2203 | TIF_NOTIFY_RESUME)) { | ||
| 2204 | smp_mb__after_clear_bit(); | ||
| 2205 | task_work_run(); | ||
| 2206 | } | ||
| 2207 | } | ||
| 2208 | 2199 | ||
| 2209 | if (unlikely(uprobe_deny_signal())) | 2200 | if (unlikely(uprobe_deny_signal())) |
| 2210 | return 0; | 2201 | return 0; |
| @@ -2369,7 +2360,7 @@ relock: | |||
| 2369 | * first and our do_group_exit call below will use | 2360 | * first and our do_group_exit call below will use |
| 2370 | * that value and ignore the one we pass it. | 2361 | * that value and ignore the one we pass it. |
| 2371 | */ | 2362 | */ |
| 2372 | do_coredump(info->si_signo, info->si_signo, regs); | 2363 | do_coredump(info, regs); |
| 2373 | } | 2364 | } |
| 2374 | 2365 | ||
| 2375 | /* | 2366 | /* |
