mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Josefsson <gandalf@wlug.westbo.se>
To: Arnd Bergmann <arnd@arndb.de>
Cc: " David S. Miller " <davem@redhat.com>,
	linux-kernel@vger.kernel.org, ultralinux@vger.kernel.org
Subject: Re: [PATCH 3/4] Consolidate sys32 select
Date: Wed, 26 May 2004 08:09:31 +0200	[thread overview]
Message-ID: <1085551771.969.109.camel@tux.rsn.bth.se> (raw)
In-Reply-To: <26879984$108552555440b3ce3274ba74.46765993@config21.schlund.de>

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]

On Wed, 2004-05-26 at 01:10, Arnd Bergmann wrote:
> Martin Josefsson <gandalf@wlug.westbo.se> schrieb am 26.05.2004,
> 00:29:13:
> 
> > You mean in compat_sys_select() ?
> > compat_ptr() takes an u32 as argument, needs casting, ugly.
> > But you want it done that way?
> 
> When using compat_ptr properly, you don't need any casts,
> see the patch below (the patch is probably messed up by my 
> broken mailer, but you get the picture).

Yes,  my brain didn't go the extra distance, davem responded before I
could get to bed and I just had to respond :)

Your patch will fix the problem, I don't even need to test it.
Thanks, looking forward to see a fix in mainline :)

> ===== fs/compat.c 1.24 vs edited =====
> --- 1.24/fs/compat.c	Sat May 22 06:31:47 2004
> +++ edited/fs/compat.c	Wed May 26 00:57:49 2004
> @@ -1300,13 +1300,15 @@
>  
>  asmlinkage long
>  compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t
> __user *outp,
> -		compat_ulong_t __user *exp, struct compat_timeval __user *tvp)
> +		compat_ulong_t __user *exp, compat_uptr_t utv)
>  {
>  	fd_set_bits fds;
> +	struct compat_timeval __user *tvp;
>  	char *bits;
>  	long timeout;
>  	int ret, size, max_fdset;
>  
> +	tvp = compat_ptr(utv);
>  	timeout = MAX_SCHEDULE_TIMEOUT;
>  	if (tvp) {
>  		time_t sec, usec;
-- 
/Martin

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-05-26  6:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-25 23:10 Arnd Bergmann
2004-05-26  6:09 ` Martin Josefsson [this message]
2004-05-27 13:39   ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2004-04-16 16:00 consolidate compat readv/writev/execve/select/nfsservctl [v2] Arnd Bergmann
2004-04-16 16:05 ` [PATCH 3/4] Consolidate sys32_select Arnd Bergmann
2004-05-25 22:02   ` Martin Josefsson
2004-05-25 22:12     ` David S. Miller
2004-05-25 22:29       ` Martin Josefsson

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=1085551771.969.109.camel@tux.rsn.bth.se \
    --to=gandalf@wlug.westbo.se \
    --cc=arnd@arndb.de \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ultralinux@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

all inboxes | Powered by JetHome®