Jan Beulich
2009-Aug-24 07:30 UTC
[Xen-devel] [PATCH] 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 <jbeulich@novell.com> --- sle10sp3-2009-08-10.orig/arch/i386/kernel/time-xen.c 2009-07-27 10:22:10.000000000 +0200 +++ sle10sp3-2009-08-10/arch/i386/kernel/time-xen.c 2009-08-10 10:41:30.000000000 +0200 @@ -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); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel