summaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-11-07 21:11:25 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 21:09:26 +0100
commit2ce5da17570771330f44ac993b77749debf7954b (patch)
tree4ee9e964ed69b5ae4c8d05a5c33fe2237c9e23b2 /kernel/signal.c
parentnew helper: get_signal() (diff)
downloadlinux-2ce5da17570771330f44ac993b77749debf7954b.tar.xz
linux-2ce5da17570771330f44ac993b77749debf7954b.zip
new helper: signal_setup_done()
usual "call force_sigsegv or signal_delivered" logics. Takes ksignal instead of separate siginfo/k_sigaction. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 79998f5b0f11..775f5552fa0e 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2396,6 +2396,15 @@ void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka,
tracehook_signal_handler(sig, info, ka, regs, stepping);
}
+void signal_setup_done(int failed, struct ksignal *ksig, int stepping)
+{
+ if (failed)
+ force_sigsegv(ksig->sig, current);
+ else
+ signal_delivered(ksig->sig, &ksig->info, &ksig->ka,
+ signal_pt_regs(), stepping);
+}
+
/*
* It could be that complete_signal() picked us to notify about the
* group-wide signal. Other threads should be notified now to take