aboutsummaryrefslogtreecommitdiffstats
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)
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 721c584ff44a..6c41778410e6 100644
--- a/arch/openrisc/kernel/signal.c
+++ b/arch/openrisc/kernel/signal.c
@@ -251,7 +251,7 @@ give_sigsegv:
251 return -EFAULT; 251 return -EFAULT;
252} 252}
253 253
254static inline int 254static inline void
255handle_signal(unsigned long sig, 255handle_signal(unsigned long sig,
256 siginfo_t *info, struct k_sigaction *ka, 256 siginfo_t *info, struct k_sigaction *ka,
257 struct pt_regs *regs) 257 struct pt_regs *regs)
@@ -260,11 +260,13 @@ handle_signal(unsigned long sig,
260 260
261 ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs); 261 ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs);
262 if (ret) 262 if (ret)
263 return ret; 263 return;
264 264
265 block_sigmask(ka, sig); 265 block_sigmask(ka, sig);
266 clear_thread_flag(TIF_RESTORE_SIGMASK);
266 267
267 return 0; 268 tracehook_signal_handler(sig, info, ka, regs,
269 test_thread_flag(TIF_SINGLESTEP));
268} 270}
269 271
270/* 272/*
@@ -341,18 +343,8 @@ void do_signal(struct pt_regs *regs)
341 * back */ 343 * back */
342 restore_saved_sigmask(); 344 restore_saved_sigmask();
343 } else { /* signr > 0 */ 345 } else { /* signr > 0 */
344
345 /* Whee! Actually deliver the signal. */ 346 /* Whee! Actually deliver the signal. */
346 if (!handle_signal(signr, &info, &ka, regs)) { 347 handle_signal(signr, &info, &ka, regs);
347 /* a signal was successfully delivered; the saved
348 * sigmask will have been stored in the signal frame,
349 * and will be restored by sigreturn, so we can simply
350 * clear the TIF_RESTORE_SIGMASK flag */
351 clear_thread_flag(TIF_RESTORE_SIGMASK);
352 }
353
354 tracehook_signal_handler(signr, &info, &ka, regs,
355 test_thread_flag(TIF_SINGLESTEP));
356 } 348 }
357 349
358 return; 350 return;