diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-06 13:39:47 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-09-27 18:04:47 +0200 |
commit | f9a38eace4498a5e9f6d2cdfc879d5444edc3a5f (patch) | |
tree | 05b69fff2e0c496ce24421adaf184b8c0ee0a9d8 /arch/um/kernel | |
parent | bf56d57638452a8ee9241c9ca082d59cd2ca4cc8 (diff) |
um: let signal_delivered() do SIGTRAP on singlestepping into handler
... rather than duplicating that in sigframe setup code (and doing that
inconsistently, at that)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/signal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index 7362d58efc29..cc9c2350e417 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c @@ -22,9 +22,13 @@ static void handle_signal(struct pt_regs *regs, unsigned long signr, struct k_sigaction *ka, siginfo_t *info) { sigset_t *oldset = sigmask_to_save(); + int singlestep = 0; unsigned long sp; int err; + if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) + singlestep = 1; + /* Did we come from a system call? */ if (PT_REGS_SYSCALL_NR(regs) >= 0) { /* If so, check system call restarting.. */ @@ -61,7 +65,7 @@ static void handle_signal(struct pt_regs *regs, unsigned long signr, if (err) force_sigsegv(signr, current); else - signal_delivered(signr, info, ka, regs, 0); + signal_delivered(signr, info, ka, regs, singlestep); } static int kern_do_signal(struct pt_regs *regs) |