Commit 39974d08 authored by Al Viro's avatar Al Viro

openrisc: tracehook_signal_handler() is supposed to be called on success

... not if sigframe couldn't have been built.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b7f9a11a
...@@ -251,7 +251,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -251,7 +251,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
return -EFAULT; return -EFAULT;
} }
static inline int static inline void
handle_signal(unsigned long sig, handle_signal(unsigned long sig,
siginfo_t *info, struct k_sigaction *ka, siginfo_t *info, struct k_sigaction *ka,
struct pt_regs *regs) struct pt_regs *regs)
...@@ -260,11 +260,13 @@ handle_signal(unsigned long sig, ...@@ -260,11 +260,13 @@ handle_signal(unsigned long sig,
ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs); ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs);
if (ret) if (ret)
return ret; return;
block_sigmask(ka, sig); 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) ...@@ -341,18 +343,8 @@ void do_signal(struct pt_regs *regs)
* back */ * back */
restore_saved_sigmask(); restore_saved_sigmask();
} else { /* signr > 0 */ } else { /* signr > 0 */
/* Whee! Actually deliver the signal. */ /* Whee! Actually deliver the signal. */
if (!handle_signal(signr, &info, &ka, regs)) { 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));
} }
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment