]> xenbits.xensource.com Git - pvdrivers/win/xencons.git/commitdiff
Fail FrontendPrepare if backend doesn't re-initialize
authorOwen Smith <owen.smith@citrix.com>
Fri, 2 Mar 2018 13:23:37 +0000 (13:23 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 2 Mar 2018 14:18:53 +0000 (14:18 +0000)
Current backend will crash (taking out the VM) if any attempt is
made to reconnect to a backend that has transitioned to the
Closed state. Forces the frontend offline, which will fail the
frontend state transitions, and its initiating IRP.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/xencons/frontend.c

index eb8e3fe0ebc7a2e84691ef2bd51c8bc7d3c7ad49..6965092b5ae928aadec0a33c19d87fbd19b06804 100644 (file)
@@ -652,6 +652,12 @@ FrontendPrepare(
         case XenbusStateClosed:
             FrontendSetXenbusState(Frontend,
                                    XenbusStateClosed);
+            // There is currently a bug in the backend.
+            // Once the backend reaches Closed, it will crash the
+            // frontend attempts to make any state transition.
+            // Avoid the bug by forcing the frontend offline and
+            // failing FrontendPrepare
+            FrontendSetOffline(Frontend);
             break;
         default:
             FrontendSetXenbusState(Frontend,