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] Do not allow an uninitialised VCPU to be brought up. Als

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Do not allow an uninitialised VCPU to be brought up. Also
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 19 Nov 2005 00:06:06 +0000
Delivery-date: Sat, 19 Nov 2005 00:06:18 +0000
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/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 56d05708736ab4c8249627d25edfd0849f1a05fb
# Parent  378e1c58bcd20a1622977796af39dcf8030e1588
Do not allow an uninitialised VCPU to be brought up. Also
check VCPUOP_up return code in the guest and BUG() on
failure.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 378e1c58bcd2 -r 56d05708736a 
linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Fri Nov 18 16:54:23 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Fri Nov 18 18:25:17 2005
@@ -410,7 +410,8 @@
 
        xen_smp_intr_init(cpu);
        cpu_set(cpu, cpu_online_map);
-       HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL);
+       if (HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL) != 0)
+               BUG();
 
        return 0;
 }
diff -r 378e1c58bcd2 -r 56d05708736a xen/common/domain.c
--- a/xen/common/domain.c       Fri Nov 18 16:54:23 2005
+++ b/xen/common/domain.c       Fri Nov 18 18:25:17 2005
@@ -425,7 +425,9 @@
         break;
 
     case VCPUOP_up:
-        if ( test_and_clear_bit(_VCPUF_down, &v->vcpu_flags) )
+        if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
+            rc = -EINVAL;
+        else if ( test_and_clear_bit(_VCPUF_down, &v->vcpu_flags) )
             vcpu_wake(v);
         break;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Do not allow an uninitialised VCPU to be brought up. Also, Xen patchbot -unstable <=