Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] x86_64: Fix ioctl compat code for /dev/rtc

RTC_IRQP_SET/RTC_EPOCH_SET don't take a pointer to an argument, but the
argument itself. This actually simplifies the code and makes it work.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andi Kleen and committed by
Linus Torvalds
fc5870f6 ab9b32ee

+2 -11
+2 -11
fs/compat_ioctl.c
··· 2531 2531 val32 = kval; 2532 2532 return put_user(val32, (unsigned int __user *)arg); 2533 2533 case RTC_IRQP_SET32: 2534 + return sys_ioctl(fd, RTC_IRQP_SET, arg); 2534 2535 case RTC_EPOCH_SET32: 2535 - ret = get_user(val32, (unsigned int __user *)arg); 2536 - if (ret) 2537 - return ret; 2538 - kval = val32; 2539 - 2540 - set_fs(KERNEL_DS); 2541 - ret = sys_ioctl(fd, (cmd == RTC_IRQP_SET32) ? 2542 - RTC_IRQP_SET : RTC_EPOCH_SET, 2543 - (unsigned long)&kval); 2544 - set_fs(oldfs); 2545 - return ret; 2536 + return sys_ioctl(fd, RTC_EPOCH_SET, arg); 2546 2537 default: 2547 2538 /* unreached */ 2548 2539 return -ENOIOCTLCMD;