[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] xen/x86: make do_settimeofday() return -EPERM when clock can't be changed



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251208522 -3600
# Node ID 506133327116f2ebd6449714beee30727b20bc38
# Parent  ccfe24b79bb4fddf8210026938e65ac5360294cd
xen/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@xxxxxxxxxx>
---
 arch/i386/kernel/time-xen.c |    3 +++
 1 files changed, 3 insertions(+)

diff -r ccfe24b79bb4 -r 506133327116 arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c       Wed Aug 19 13:00:40 2009 +0100
+++ b/arch/i386/kernel/time-xen.c       Tue Aug 25 14:55:22 2009 +0100
@@ -462,6 +462,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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.