summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-10-07 15:26:57 +0200
committerRichard Weinberger <richard@sigma-star.at>2014-08-06 13:03:44 +0200
commit828b1f65d23cf8a68795739f6dd08fc8abd9ee64 (patch)
treebb660d0c7a85e875f96f281729cb752184e1c7af /kernel
parent10b1c7ac8bfed429cf3dcb0225482c8dc1485d8e (diff)
downloadlinux-828b1f65d23cf8a68795739f6dd08fc8abd9ee64.tar.bz2
Rip out get_signal_to_deliver()
Now we can turn get_signal() to the main function. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 0d75cf875d44..5c6020040388 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2166,8 +2166,7 @@ static int ptrace_signal(int signr, siginfo_t *info)
return signr;
}
-int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
- struct pt_regs *regs, void *cookie)
+int get_signal(struct ksignal *ksig)
{
struct sighand_struct *sighand = current->sighand;
struct signal_struct *signal = current->signal;
@@ -2237,13 +2236,13 @@ relock:
goto relock;
}
- signr = dequeue_signal(current, &current->blocked, info);
+ signr = dequeue_signal(current, &current->blocked, &ksig->info);
if (!signr)
break; /* will return 0 */
if (unlikely(current->ptrace) && signr != SIGKILL) {
- signr = ptrace_signal(signr, info);
+ signr = ptrace_signal(signr, &ksig->info);
if (!signr)
continue;
}
@@ -2251,13 +2250,13 @@ relock:
ka = &sighand->action[signr-1];
/* Trace actually delivered signals. */
- trace_signal_deliver(signr, info, ka);
+ trace_signal_deliver(signr, &ksig->info, ka);
if (ka->sa.sa_handler == SIG_IGN) /* Do nothing. */
continue;
if (ka->sa.sa_handler != SIG_DFL) {
/* Run the handler. */
- *return_ka = *ka;
+ ksig->ka = *ka;
if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL;
@@ -2307,7 +2306,7 @@ relock:
spin_lock_irq(&sighand->siglock);
}
- if (likely(do_signal_stop(info->si_signo))) {
+ if (likely(do_signal_stop(ksig->info.si_signo))) {
/* It released the siglock. */
goto relock;
}
@@ -2328,7 +2327,7 @@ relock:
if (sig_kernel_coredump(signr)) {
if (print_fatal_signals)
- print_fatal_signal(info->si_signo);
+ print_fatal_signal(ksig->info.si_signo);
proc_coredump_connector(current);
/*
* If it was able to dump core, this kills all
@@ -2338,17 +2337,19 @@ relock:
* first and our do_group_exit call below will use
* that value and ignore the one we pass it.
*/
- do_coredump(info);
+ do_coredump(&ksig->info);
}
/*
* Death signals, no core dump.
*/
- do_group_exit(info->si_signo);
+ do_group_exit(ksig->info.si_signo);
/* NOTREACHED */
}
spin_unlock_irq(&sighand->siglock);
- return signr;
+
+ ksig->sig = signr;
+ return ksig->sig > 0;
}
/**