diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 14:50:51 +0000 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 14:50:51 +0000 |
commit | b4d8d1a93c6ea042b29bb66fbb1cf6bc556c18f7 (patch) | |
tree | 030ef62361042d1a034087ad9a726db3b57bba72 /fs/compat_ioctl.c | |
parent | bb8047d3540affd6b8c2adac3fe792e07143be0f (diff) | |
parent | 2e6e33bab6e1996a5dec9108fb467b52b841e7a8 (diff) | |
download | kernel-crypto-b4d8d1a93c6ea042b29bb66fbb1cf6bc556c18f7.tar.gz kernel-crypto-b4d8d1a93c6ea042b29bb66fbb1cf6bc556c18f7.tar.xz kernel-crypto-b4d8d1a93c6ea042b29bb66fbb1cf6bc556c18f7.zip |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 057e60217fc..c666769a875 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -446,7 +446,7 @@ static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg) ifr = ifc.ifc_req; ifr32 = compat_ptr(ifc32.ifcbuf); for (i = 0, j = 0; - i + sizeof (struct ifreq32) < ifc32.ifc_len && j < ifc.ifc_len; + i + sizeof (struct ifreq32) <= ifc32.ifc_len && j < ifc.ifc_len; i += sizeof (struct ifreq32), j += sizeof (struct ifreq)) { if (copy_in_user(ifr32, ifr, sizeof (struct ifreq32))) return -EFAULT; @@ -2531,18 +2531,9 @@ static int rtc_ioctl(unsigned fd, unsigned cmd, unsigned long arg) val32 = kval; return put_user(val32, (unsigned int __user *)arg); case RTC_IRQP_SET32: + return sys_ioctl(fd, RTC_IRQP_SET, arg); case RTC_EPOCH_SET32: - ret = get_user(val32, (unsigned int __user *)arg); - if (ret) - return ret; - kval = val32; - - set_fs(KERNEL_DS); - ret = sys_ioctl(fd, (cmd == RTC_IRQP_SET32) ? - RTC_IRQP_SET : RTC_EPOCH_SET, - (unsigned long)&kval); - set_fs(oldfs); - return ret; + return sys_ioctl(fd, RTC_EPOCH_SET, arg); default: /* unreached */ return -ENOIOCTLCMD; |