aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300/kernel/signal.c')
-rw-r--r--arch/h8300/kernel/signal.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c
index cd63f5a6c8fe..78e9b65df93e 100644
--- a/arch/h8300/kernel/signal.c
+++ b/arch/h8300/kernel/signal.c
@@ -304,7 +304,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
304 return (void *)((usp - frame_size) & -8UL); 304 return (void *)((usp - frame_size) & -8UL);
305} 305}
306 306
307static void setup_frame (int sig, struct k_sigaction *ka, 307static int setup_frame (int sig, struct k_sigaction *ka,
308 sigset_t *set, struct pt_regs *regs) 308 sigset_t *set, struct pt_regs *regs)
309{ 309{
310 struct sigframe *frame; 310 struct sigframe *frame;
@@ -365,13 +365,14 @@ static void setup_frame (int sig, struct k_sigaction *ka,
365 regs->er1 = (unsigned long)&(frame->sc); 365 regs->er1 = (unsigned long)&(frame->sc);
366 regs->er5 = current->mm->start_data; /* GOT base */ 366 regs->er5 = current->mm->start_data; /* GOT base */
367 367
368 return; 368 return 0;
369 369
370give_sigsegv: 370give_sigsegv:
371 force_sigsegv(sig, current); 371 force_sigsegv(sig, current);
372 return -EFAULT;
372} 373}
373 374
374static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info, 375static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
375 sigset_t *set, struct pt_regs *regs) 376 sigset_t *set, struct pt_regs *regs)
376{ 377{
377 struct rt_sigframe *frame; 378 struct rt_sigframe *frame;
@@ -440,10 +441,11 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
440 regs->er2 = (unsigned long)&frame->uc; 441 regs->er2 = (unsigned long)&frame->uc;
441 regs->er5 = current->mm->start_data; /* GOT base */ 442 regs->er5 = current->mm->start_data; /* GOT base */
442 443
443 return; 444 return 0;
444 445
445give_sigsegv: 446give_sigsegv:
446 force_sigsegv(sig, current); 447 force_sigsegv(sig, current);
448 return -EFAULT;
447} 449}
448 450
449/* 451/*
@@ -453,6 +455,7 @@ static void
453handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, 455handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
454 sigset_t *oldset, struct pt_regs * regs) 456 sigset_t *oldset, struct pt_regs * regs)
455{ 457{
458 int ret;
456 /* are we from a system call? */ 459 /* are we from a system call? */
457 if (regs->orig_er0 >= 0) { 460 if (regs->orig_er0 >= 0) {
458 switch (regs->er0) { 461 switch (regs->er0) {
@@ -475,11 +478,12 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
475 478
476 /* set up the stack frame */ 479 /* set up the stack frame */
477 if (ka->sa.sa_flags & SA_SIGINFO) 480 if (ka->sa.sa_flags & SA_SIGINFO)
478 setup_rt_frame(sig, ka, info, oldset, regs); 481 ret = setup_rt_frame(sig, ka, info, oldset, regs);
479 else 482 else
480 setup_frame(sig, ka, oldset, regs); 483 ret = setup_frame(sig, ka, oldset, regs);
481 484
482 block_sigmask(ka, sig); 485 if (!ret)
486 block_sigmask(ka, sig);
483} 487}
484 488
485/* 489/*