linux/x86: make do_settimeofday() return -EPERM when clock can't be changed
PATCH 1/1 linux/x86: make do_settimeofday() return -EPERM when clock can't be changed
Rather than returning success here (without actually having done anything), it seems more appropriate/conforming to let the caller know that what he intended to do didn't succeed.
Signed-off-by Jan Beulich <[email protected]>
arch/i386/kernel/time-xen.c +3 -0
@@ -470,6 +470,9 @@ int do_settimeofday(struct timespec *tv)if ((unsigned long )tv->tv_nsec >=NSEC_PER_SEC )return -EINVAL ; +if (!is_initial_xendomain () && !independent_wallclock) +return -EPERM ; + cpu =get_cpu (); shadow = &per_cpu (shadow_time, cpu);