diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index bb05917f232c..b1bc90f19b9a 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -482,18 +482,21 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
482 | /* | 482 | /* |
483 | * OK, we're invoking a handler: | 483 | * OK, we're invoking a handler: |
484 | */ | 484 | */ |
485 | static int signr_convert(int sig) | ||
486 | { | ||
487 | struct thread_info *info = current_thread_info(); | ||
488 | |||
489 | if (info->exec_domain && info->exec_domain->signal_invmap && sig < 32) | ||
490 | return info->exec_domain->signal_invmap[sig]; | ||
491 | return sig; | ||
492 | } | ||
493 | |||
485 | static int | 494 | static int |
486 | setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 495 | setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
487 | sigset_t *set, struct pt_regs *regs) | 496 | sigset_t *set, struct pt_regs *regs) |
488 | { | 497 | { |
498 | int usig = signr_convert(sig); | ||
489 | int ret; | 499 | int ret; |
490 | int usig; | ||
491 | |||
492 | usig = current_thread_info()->exec_domain | ||
493 | && current_thread_info()->exec_domain->signal_invmap | ||
494 | && sig < 32 | ||
495 | ? current_thread_info()->exec_domain->signal_invmap[sig] | ||
496 | : sig; | ||
497 | 500 | ||
498 | /* Set up the stack frame */ | 501 | /* Set up the stack frame */ |
499 | if (ka->sa.sa_flags & SA_SIGINFO) | 502 | if (ka->sa.sa_flags & SA_SIGINFO) |