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

[win-pv-devel] [PATCH 3/4] Don't assume EventPageMdl has been allocated...



...when calling EvtchnFifoContract()

The allocation is deferred until at least one event channel is allocated,
but EvtchnFifoContract() is called from EvtchnFifoRelease()n which can be
called before that happens.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenbus/evtchn_fifo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xenbus/evtchn_fifo.c b/src/xenbus/evtchn_fifo.c
index c0456e0..b8be93b 100644
--- a/src/xenbus/evtchn_fifo.c
+++ b/src/xenbus/evtchn_fifo.c
@@ -272,7 +272,8 @@ EvtchnFifoContract(
         __FreePage(Mdl);
     }
 
-    __EvtchnFifoFree(Context->EventPageMdl);
+    if (Context->EventPageMdl != NULL)
+        __EvtchnFifoFree(Context->EventPageMdl);
 
     Context->EventPageMdl = NULL;
     Context->EventPageCount = 0;
-- 
2.5.3


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

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