Commit e2b55306 authored by Paul Mackerras's avatar Paul Mackerras

ppc64: Fix delivery of RT signals to 32-bit processes.

An error in merging led to 32-bit processes getting the wrong link
register value on entry to RT signal handlers, and the wrong stack
chain as well.  This fixes it.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 5c8c56eb
...@@ -821,7 +821,7 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka, ...@@ -821,7 +821,7 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka,
goto badframe; goto badframe;
regs->link = (unsigned long) frame->tramp; regs->link = (unsigned long) frame->tramp;
} }
if (put_user(regs->gpr[1], (unsigned long __user *)newsp)) if (put_user(regs->gpr[1], (u32 __user *)newsp))
goto badframe; goto badframe;
regs->gpr[1] = newsp; regs->gpr[1] = newsp;
regs->gpr[3] = sig; regs->gpr[3] = sig;
...@@ -829,7 +829,6 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka, ...@@ -829,7 +829,6 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka,
regs->gpr[5] = (unsigned long) &rt_sf->uc; regs->gpr[5] = (unsigned long) &rt_sf->uc;
regs->gpr[6] = (unsigned long) rt_sf; regs->gpr[6] = (unsigned long) rt_sf;
regs->nip = (unsigned long) ka->sa.sa_handler; regs->nip = (unsigned long) ka->sa.sa_handler;
regs->link = (unsigned long) frame->tramp;
regs->trap = 0; regs->trap = 0;
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
regs->result = 0; regs->result = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment