From 9ee05bb627c08eae8b854c9fa1d77e75188954b6 Mon Sep 17 00:00:00 2001 From: Yoshinori Sato Date: Sat, 5 Dec 2015 21:36:53 +0900 Subject: [PATCH] h8300: signal stack fix Signed-off-by: Yoshinori Sato --- arch/h8300/kernel/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index 380fffd081b2..ad1f81f574e5 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c @@ -95,7 +95,7 @@ restore_sigcontext(struct sigcontext *usc, int *pd0) regs->ccr |= ccr; regs->orig_er0 = -1; /* disable syscall checks */ err |= __get_user(usp, &usc->sc_usp); - wrusp(usp); + regs->sp = usp; err |= __get_user(er0, &usc->sc_er0); *pd0 = er0; @@ -180,7 +180,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, return -EFAULT; /* Set up to return from userspace. */ - ret = frame->retcode; + ret = (unsigned char *)&frame->retcode; if (ksig->ka.sa.sa_flags & SA_RESTORER) ret = (unsigned char *)(ksig->ka.sa.sa_restorer); else { @@ -196,8 +196,8 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, return -EFAULT; /* Set up registers for signal handler */ - wrusp((unsigned long) frame); - regs->pc = (unsigned long) ksig->ka.sa.sa_handler; + regs->sp = (unsigned long)frame; + regs->pc = (unsigned long)ksig->ka.sa.sa_handler; regs->er0 = ksig->sig; regs->er1 = (unsigned long)&(frame->info); regs->er2 = (unsigned long)&frame->uc; -- 2.20.1