On Thu, Oct 25, 2012 at 05:46:38PM +0200, Jonas Bonn wrote: > Signed-off-by: Jonas Bonn <jo...@southpole.se> > --- > arch/openrisc/kernel/process.c | 6 +++++- > arch/openrisc/kernel/sys_or32.c | 8 +------- > 2 files changed, 6 insertions(+), 8 deletions(-) > > diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c > index e0874b8..efbe4f8 100644 > --- a/arch/openrisc/kernel/process.c > +++ b/arch/openrisc/kernel/process.c > @@ -170,7 +170,11 @@ copy_thread(unsigned long clone_flags, unsigned long usp, > } else { > *userregs = *regs; > > - userregs->sp = usp; > + if (usp) > + userregs->sp = usp; /* clone */
OK > + else > + userregs->sp = regs->sp; /* fork/clone */ What for? userregs->sp will be equal to regs->sp at that point, unless your compiler is very badly broken. You've copied *regs to *userregs wholesale, just above that if... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/