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

[PATCH xenbus 1/4] Avoid non-zero memory ASSERTion if FdoVirqInitialize() fails



From: Paul Durrant <pdurrant@xxxxxxxxxx>

FdoVirqTeardown() should also be called from the 'fail1' label to clean up
'VirqList'. This patch also modifies FdoVirqTeardown() to make sure 'VirqLock'
is properly zeroed.

Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
 src/xenbus/fdo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/xenbus/fdo.c b/src/xenbus/fdo.c
index 5419be4911ce..18f936baae38 100644
--- a/src/xenbus/fdo.c
+++ b/src/xenbus/fdo.c
@@ -2966,6 +2966,7 @@ FdoVirqTeardown(
         __FdoVirqDestroy(Virq);
     }
 
+    RtlZeroMemory(&Fdo->VirqLock, sizeof (HIGH_LOCK));
     RtlZeroMemory(&Fdo->VirqList, sizeof (LIST_ENTRY));
 }
 
@@ -3018,11 +3019,11 @@ fail3:
 fail2:
     Error("fail2\n");
 
-    FdoVirqTeardown(Fdo);
-
 fail1:
     Error("fail1 (%08x)\n", status);
 
+    FdoVirqTeardown(Fdo);
+
     return status;
 }
 
-- 
2.17.1




 


Rackspace

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