Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH] implement generic rtc compat ioctl handling | Date | Mon, 14 Nov 2005 13:09:36 +0100 |
| |
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 <>< - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |