]> xenbits.xensource.com Git - xen.git/commitdiff
bitkeeper revision 1.1159.130.6 (41793773TFex2kvneKZIR5JlCHOzQQ)
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Fri, 22 Oct 2004 16:38:11 +0000 (16:38 +0000)
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Fri, 22 Oct 2004 16:38:11 +0000 (16:38 +0000)
Bugfixes.

xen/arch/x86/memory.c
xen/common/event_channel.c

index 30688db3dad4ceb759a30e2c3d87c35bbdaf5813..ad1d6f0ef58a62ad86900228e0abd59cc914e94b 100644 (file)
@@ -403,7 +403,7 @@ get_page_from_l1e(
 
     return ((l1v & _PAGE_RW) ?
             get_page_and_type(page, d, PGT_writable_page) :
-            get_page(d));
+            get_page(page, d));
 }
 
 
index fe47b9e524930b735540baa2dde32df33556ed4d..ca2eb46f1220bd0ab462374d447ad2426d1f3100 100644 (file)
@@ -167,9 +167,12 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
         break;
 
     case ECS_INTERDOMAIN:
-        rc = ((d1->event_channel[port1].u.interdomain.remote_dom != d2) ||
-              (d1->event_channel[port1].u.interdomain.remote_port != port2)) ?
-            -EINVAL : 0;
+        if ( d1->event_channel[port1].u.interdomain.remote_dom != d2 )
+            ERROR_EXIT(-EINVAL);
+        if ( (d1->event_channel[port1].u.interdomain.remote_port != port2) &&
+             (bind->port2 != 0) )
+            ERROR_EXIT(-EINVAL);
+        port2 = d1->event_channel[port1].u.interdomain.remote_port;
         goto out;
 
     default:
@@ -189,6 +192,15 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
             ERROR_EXIT(-EINVAL);
         break;
 
+    case ECS_INTERDOMAIN:
+        if ( d2->event_channel[port2].u.interdomain.remote_dom != d1 )
+            ERROR_EXIT(-EINVAL);
+        if ( (d2->event_channel[port2].u.interdomain.remote_port != port1) &&
+             (bind->port1 != 0) )
+            ERROR_EXIT(-EINVAL);
+        port1 = d2->event_channel[port2].u.interdomain.remote_port;
+        goto out;
+
     default:
         ERROR_EXIT(-EINVAL);
     }