You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
posix-timers: Take compat timer_settime(2) to native one
... and get rid of set_fs() in there Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: John Stultz <john.stultz@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20170607084241.28657-10-viro@ZenIV.linux.org.uk
This commit is contained in:
@@ -635,29 +635,6 @@ COMPAT_SYSCALL_DEFINE3(timer_create, clockid_t, which_clock,
|
||||
return sys_timer_create(which_clock, event, created_timer_id);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags,
|
||||
struct compat_itimerspec __user *, new,
|
||||
struct compat_itimerspec __user *, old)
|
||||
{
|
||||
long err;
|
||||
mm_segment_t oldfs;
|
||||
struct itimerspec newts, oldts;
|
||||
|
||||
if (!new)
|
||||
return -EINVAL;
|
||||
if (get_compat_itimerspec(&newts, new))
|
||||
return -EFAULT;
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
err = sys_timer_settime(timer_id, flags,
|
||||
(struct itimerspec __user *) &newts,
|
||||
(struct itimerspec __user *) &oldts);
|
||||
set_fs(oldfs);
|
||||
if (!err && old && put_compat_itimerspec(old, &oldts))
|
||||
return -EFAULT;
|
||||
return err;
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE2(timer_gettime, timer_t, timer_id,
|
||||
struct compat_itimerspec __user *, setting)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user