]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Skip interface checks on non-active FDO
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 4 Dec 2015 16:01:03 +0000 (16:01 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 4 Dec 2015 16:01:03 +0000 (16:01 +0000)
If the non-active FDO powers down before the active one then we end up
with the BUG_ONs firing erroneously.

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

index e889871c29c20ba29d0b8479eba67a74a6b9406d..00801c9811e224fc0f575eb6b9f2f31ef193cbc0 100644 (file)
@@ -3206,6 +3206,9 @@ FdoS3ToS4(
     ASSERT3U(KeGetCurrentIrql(), ==, PASSIVE_LEVEL);
     ASSERT3U(__FdoGetSystemPowerState(Fdo), ==, PowerSystemSleeping3);
 
+    if (!__FdoIsActive(Fdo))
+        goto not_active;
+
     BUG_ON(SuspendGetReferences(Fdo->SuspendContext) != 0);
     BUG_ON(SharedInfoGetReferences(Fdo->SharedInfoContext) != 0);
     BUG_ON(EvtchnGetReferences(Fdo->EvtchnContext) != 0);
@@ -3217,6 +3220,7 @@ FdoS3ToS4(
     BUG_ON(UnplugGetReferences(Fdo->UnplugContext) != 0);
     BUG_ON(BalloonGetReferences(Fdo->BalloonContext) != 0);
 
+not_active:
     __FdoSetSystemPowerState(Fdo, PowerSystemHibernate);
 
     Trace("<====\n");