X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Fsignal.c;h=9e224469c78887e9c2eb55779bfc8d4646ca2f09;hb=4305f42401b29e2e024bd064618faf25aef5cb69;hp=1975cd2f7de6f1096530e423a73ebd720dcfe44d;hpb=db8262787e82b5c0fa57bd9d676add187519a751;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 1975cd2..9e22446 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -772,6 +772,14 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) struct mips_abi *abi = current->thread.abi; void *vdso = current->mm->context.vdso; + /* + * If we were emulating a delay slot instruction, exit that frame such + * that addresses in the sigframe are as expected for userland and we + * don't have a problem if we reuse the thread's frame for an + * instruction within the signal handler. + */ + dsemul_thread_rollback(regs); + if (regs->regs[0]) { switch(regs->regs[2]) { case ERESTART_RESTARTBLOCK: