public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andi Kleen <ak@suse.de>
Cc: William Lee Irwin III <wli@holomorphy.com>, linux-arch@vger.kernel.org
Subject: Re: [PATCH 3/4] Consolidate sys32_select
Date: Mon, 5 Apr 2004 01:41:07 +0200	[thread overview]
Message-ID: <200404050141.07872.arnd@arndb.de> (raw)
In-Reply-To: <20040404233544.GA10937@wotan.suse.de>

On Monday 05 April 2004 01:35, Andi Kleen wrote:
> > ===== fs/compat.c 1.25 vs edited =====
> > --- 1.25/fs/compat.c	Sat Apr  3 23:51:59 2004
> > +++ edited/fs/compat.c	Mon Apr  5 00:48:52 2004
> > @@ -1377,8 +1377,9 @@
> >  			usec = timeout % HZ;
> >  			usec *= (1000000/HZ);
> >  		}
> > -		ret = __put_user(sec, &tvp->tv_sec);
> > -		ret |= __put_user(usec, &tvp->tv_usec);
> > +		if (put_user(sec, &tvp->tv_sec) ||
> > +		    put_user(usec, &tvp->tv_usec))
> > +			ret = -EFAULT;
> 
> Are you sure? They should be equivalent. __put_user returns -EFAULT
> on error.

Yes, but if put_user succeeds, the value of ret must not be
set to zero here, it already contains the number of descriptors.

	Arnd <><

  reply	other threads:[~2004-04-04 23:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200404040204.03594.arnd@arndb.de>
2004-04-04  0:22 ` [PATCH 1/4] Consolidate sys32_readv and sys32_writev Arnd Bergmann
2004-04-04  0:22 ` [PATCH 2/4] Consolidate do_execve32 Arnd Bergmann
2004-04-13 18:45   ` Arun Sharma
2004-04-04  0:22 ` [PATCH 3/4] Consolidate sys32_select Arnd Bergmann
2004-04-04 10:24   ` Andi Kleen
2004-04-04 10:36     ` Arnd Bergmann
2004-04-04 11:04       ` Andi Kleen
2004-04-04 11:07     ` William Lee Irwin III
2004-04-04 22:51       ` Arnd Bergmann
2004-04-04 23:35         ` Andi Kleen
2004-04-04 23:41           ` Arnd Bergmann [this message]
2004-04-07 20:46   ` Arun Sharma
2004-04-08  8:22     ` Arnd Bergmann
2004-04-12 18:55       ` Arun Sharma
2004-04-04  0:22 ` [PATCH 4/4] Consolidate sys32_nfsservctl Arnd Bergmann

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=200404050141.07872.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ak@suse.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /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