WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] xen/x86: make do_settimeofday() retur

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen/x86: make do_settimeofday() return -EPERM when clock can't be changed
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Aug 2009 07:05:37 -0700
Delivery-date: Tue, 25 Aug 2009 07:06:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen/x86: make do_settimeofday() return -EPERM when clock can't be changed, Xen patchbot-linux-2.6.18-xen <=