summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-26 23:42:55 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:58:48 -0400
commit39974d085d003163f61c65917c22d6c7620ffdb6 (patch)
tree2b12d2e5fdf7c62f69ae633e31973cec10410c00
parentb7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (diff)
downloadop-kernel-dev-39974d085d003163f61c65917c22d6c7620ffdb6.zip
op-kernel-dev-39974d085d003163f61c65917c22d6c7620ffdb6.tar.gz
openrisc: tracehook_signal_handler() is supposed to be called on success
... not if sigframe couldn't have been built. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--arch/openrisc/kernel/signal.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c
index 721c584..6c417784 100644
--- a/arch/openrisc/kernel/signal.c
+++ b/arch/openrisc/kernel/signal.c
@@ -251,7 +251,7 @@ give_sigsegv:
return -EFAULT;
}
-static inline int
+static inline void
handle_signal(unsigned long sig,
siginfo_t *info, struct k_sigaction *ka,
struct pt_regs *regs)
@@ -260,11 +260,13 @@ handle_signal(unsigned long sig,
ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs);
if (ret)
- return ret;
+ return;
block_sigmask(ka, sig);
+ clear_thread_flag(TIF_RESTORE_SIGMASK);
- return 0;
+ tracehook_signal_handler(sig, info, ka, regs,
+ test_thread_flag(TIF_SINGLESTEP));
}
/*
@@ -341,18 +343,8 @@ void do_signal(struct pt_regs *regs)
* back */
restore_saved_sigmask();
} else { /* signr > 0 */
-
/* Whee! Actually deliver the signal. */
- if (!handle_signal(signr, &info, &ka, regs)) {
- /* a signal was successfully delivered; the saved
- * sigmask will have been stored in the signal frame,
- * and will be restored by sigreturn, so we can simply
- * clear the TIF_RESTORE_SIGMASK flag */
- clear_thread_flag(TIF_RESTORE_SIGMASK);
- }
-
- tracehook_signal_handler(signr, &info, &ka, regs,
- test_thread_flag(TIF_SINGLESTEP));
+ handle_signal(signr, &info, &ka, regs);
}
return;
OpenPOWER on IntegriCloud