]> xenbits.xensource.com Git - xen.git/commitdiff
bitkeeper revision 1.1236.21.2 (422f76e3sErbaCNhhldMjyldFfweSg)
authorkaf24@viper.(none) <kaf24@viper.(none)>
Wed, 9 Mar 2005 22:21:23 +0000 (22:21 +0000)
committerkaf24@viper.(none) <kaf24@viper.(none)>
Wed, 9 Mar 2005 22:21:23 +0000 (22:21 +0000)
Little fixes from Rik van Riel and Anthony Liguori.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/common/dom0_ops.c
xen/common/grant_table.c

index 50b59cb4190e2700c430009c61672857cc410e8f..2bf6f1aaf6cdad51132d02570b4cf59230b8cd3d 100644 (file)
@@ -114,7 +114,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     case DOM0_BUILDDOMAIN:
     {
         struct domain *d = find_domain_by_id(op->u.builddomain.domain);
-        ret = -EINVAL;
+        ret = -ESRCH;
         if ( d != NULL )
         {
             ret = final_setup_guest(d, &op->u.builddomain);
@@ -147,7 +147,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
         if ( d != NULL )
         {
             ret = -EINVAL;
-            if ( test_bit(DF_CONSTRUCTED, &d->d_flags) )
+            if ( (d != current->domain) && 
+                 test_bit(DF_CONSTRUCTED, &d->d_flags) )
             {
                 domain_unpause_by_systemcontroller(d);
                 ret = 0;
index b13ce0c6361975dbabd5974a2868cd19304c1e15..c4b72c6257a77fcf0b13b5232cef513038c02626 100644 (file)
@@ -345,7 +345,7 @@ gnttab_map_grant_ref(
     gnttab_map_grant_ref_t *uop, unsigned int count)
 {
     int i, flush = 0;
-    unsigned long va;
+    unsigned long va = 0;
 
     for ( i = 0; i < count; i++ )
         if ( __gnttab_map_grant_ref(&uop[i], &va) == 0)
@@ -353,8 +353,9 @@ gnttab_map_grant_ref(
 
     if ( flush == 1 )
         __flush_tlb_one(va);
-    else if ( flush )
+    else if ( flush != 0 )
         local_flush_tlb();
+
     return 0;
 }