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] [xen-unstable] [XEN] Allow shutdown code to be set at mo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Allow shutdown code to be set at most once per domain.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 03 Dec 2006 15:10:35 +0000
Delivery-date: Sun, 03 Dec 2006 07:12:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 107f74d363eacb4db0ad388a9042b745ebdd1d3f
# Parent  69efe6730fb1e2972f1413a877d88a6c09ca4451
[XEN] Allow shutdown code to be set at most once per domain.
SIgned-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/common/domain.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 69efe6730fb1 -r 107f74d363ea xen/common/domain.c
--- a/xen/common/domain.c       Fri Dec 01 09:01:04 2006 -0800
+++ b/xen/common/domain.c       Fri Dec 01 17:29:04 2006 +0000
@@ -283,8 +283,8 @@ void domain_shutdown(struct domain *d, u
     if ( d->domain_id == 0 )
         dom0_shutdown(reason);
 
-    d->shutdown_code = reason;
-    set_bit(_DOMF_shutdown, &d->domain_flags);
+    if ( !test_and_set_bit(_DOMF_shutdown, &d->domain_flags) )
+        d->shutdown_code = reason;
 
     for_each_vcpu ( d, v )
         vcpu_sleep_nosync(v);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Allow shutdown code to be set at most once per domain., Xen patchbot-unstable <=