linux-mips
[Top] [All Lists]

Re: sys32_execve fix

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: sys32_execve fix
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Mon, 22 Jul 2002 20:36:18 +0200
Cc: Carsten Langgaard <carstenl@mips.com>, linux-mips@oss.sgi.com
In-reply-to: <Pine.GSO.3.96.1020722184609.2373J-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Mon, Jul 22, 2002 at 06:56:42PM +0200
References: <3D3C0E26.676F4799@mips.com> <Pine.GSO.3.96.1020722184609.2373J-100000@delta.ds2.pg.gda.pl>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5.1i
On Mon, Jul 22, 2002 at 06:56:42PM +0200, Maciej W. Rozycki wrote:

> > The problem is that "nargs" in arch/mips64/kernel/linux32.c fails when
> > argv is NULL, the patch below should fix the problem:
> 
>  How about just:
> 
>       if (!arg)
>               return 0;
> 
> at the top?  Gcc should optimize it to a single branch, likely not taken,
> and a register move.

Right.  Coincidentally this is also what was done to the IA64 port where
this code did originate.

  Ralf


<Prev in Thread] Current Thread [Next in Thread>