public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Christoph Hellwig <hch@lst.de>
Cc: akpm@osdl.org, ak@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] implement generic rtc compat ioctl handling
Date: Mon, 14 Nov 2005 13:09:36 +0100	[thread overview]
Message-ID: <200511141309.37180.arnd@arndb.de> (raw)
In-Reply-To: <20051111092021.GA26750@lst.de>

On Freedag 11 November 2005 10:20, Christoph Hellwig wrote:
> +static int rtc_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
> +{
> +       compat_ulong_t __user *val = compat_alloc_user_space(sizeof(*val));
> +       compat_ulong_t __user *uval = (compat_ulong_t __user *)arg;
> +       int ret;
> +
> 
This one should really be 

compat_ulong_t __user *uval = compat_ptr(arg);

It's not really a problem since the only architecture where compat_ptr()
makes a difference (64 bit s390) doesn't have an RTC driver, but it
should be changed nevertheless.

Also, I suppose the declaration of val is wrong, since the ioctl methods
expect a pointer to an unsigned long, not a compat_ulong_t. If you
change that, the copy_in_user() won't work either.

	Arnd <><

  reply	other threads:[~2005-11-14 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11  9:20 [PATCH] implement generic rtc compat ioctl handling Christoph Hellwig
2005-11-14 12:09 ` Arnd Bergmann [this message]
2005-11-20 18:23   ` Christoph Hellwig

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=200511141309.37180.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=hch@lst.de \
    --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