]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Fix event channel ABI fall-back
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 10 Apr 2018 16:24:58 +0000 (17:24 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 10 Apr 2018 16:24:58 +0000 (17:24 +0100)
If the version of Xen that the guest is running on does not support the
FIFO event channel ABI then the code is supposed to fall back to using the
old '2-level' ABI through the shared info page. However, this fall-back
does not work correctly because the error path in EvtchnFifoAcquire()
causes the error status to be overwritten with STATUS_SUCCESS.

This patch makes sure the error status is preserved.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenbus/evtchn_fifo.c

index b8be93b68688be3e6593ec2950e5ab645bbb5142..c08e664041c6258eb7b55a28fc643087e7b6e615 100644 (file)
@@ -540,6 +540,8 @@ done:
     return STATUS_SUCCESS;
 
 fail2:
+    Error("fail2\n");
+
     __FreePage(Mdl);
 
 fail1:
@@ -550,8 +552,7 @@ fail1:
     while (--Index >= 0) {
         unsigned int    vcpu_id;
 
-        status = SystemVirtualCpuIndex(Index, &vcpu_id);
-        ASSERT(NT_SUCCESS(status));
+        (VOID) SystemVirtualCpuIndex(Index, &vcpu_id);
 
         Mdl = Context->ControlBlockMdl[vcpu_id];
         Context->ControlBlockMdl[vcpu_id] = NULL;