[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix failure cleanup in EvtchnFifoAcquire



The current index is incremented before checking for failure:

    while (Index < ProcessorCount) {
        Index++;
        [...]
        if (!NT_SUCCESS(status))
            goto fail1;
        Context->ControlBlockMdl[vcpu_id] = Mdl;
    }

Decrement the index before going into the cleanup loop to avoid calling
__FreePage on invalid PMDLs.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 src/xenbus/evtchn_fifo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/xenbus/evtchn_fifo.c b/src/xenbus/evtchn_fifo.c
index 1137dea..ed78815 100644
--- a/src/xenbus/evtchn_fifo.c
+++ b/src/xenbus/evtchn_fifo.c
@@ -561,6 +561,7 @@ fail1:
 
     EvtchnReset();
 
+    Index--;
     while (--Index >= 0) {
         unsigned int    vcpu_id;
 
-- 
2.50.1.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.