[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121025155516.GL2616@ZenIV.linux.org.uk>
Date: Thu, 25 Oct 2012 16:55:16 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Jonas Bonn <jonas@...thpole.se>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] openrisc: move sys_clone's stack determination to
copy_thread
On Thu, Oct 25, 2012 at 05:46:38PM +0200, Jonas Bonn wrote:
> Signed-off-by: Jonas Bonn <jonas@...thpole.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists