mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jonas Bonn <jonas@southpole.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] openrisc: move sys_clone's stack determination to copy_thread
Date: Thu, 25 Oct 2012 16:55:16 +0100	[thread overview]
Message-ID: <20121025155516.GL2616@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1351179999-8376-2-git-send-email-jonas@southpole.se>

On Thu, Oct 25, 2012 at 05:46:38PM +0200, Jonas Bonn wrote:
> Signed-off-by: Jonas Bonn <jonas@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...

  reply	other threads:[~2012-10-25 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25 15:46 [PATCH 0/2] openrisc: more kernel_thread cleanup Jonas Bonn
2012-10-25 15:46 ` [PATCH 1/2] openrisc: move sys_clone's stack determination to copy_thread Jonas Bonn
2012-10-25 15:55   ` Al Viro [this message]
2012-10-25 16:16     ` Jonas Bonn
2012-10-25 15:46 ` [PATCH 2/2] openrisc: determine regs directly in copy_thread Jonas Bonn
2012-10-25 16:27   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121025155516.GL2616@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=jonas@southpole.se \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome