From: Owen Smith Date: Fri, 2 Mar 2018 13:23:37 +0000 (+0000) Subject: Fail FrontendPrepare if backend doesn't re-initialize X-Git-Tag: 9.0.0-rc1~16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cbb284d59dcca77fe1e47be4d5dba474d5c798a2;p=pvdrivers%2Fwin%2Fxencons.git Fail FrontendPrepare if backend doesn't re-initialize 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 --- diff --git a/src/xencons/frontend.c b/src/xencons/frontend.c index eb8e3fe..6965092 100644 --- a/src/xencons/frontend.c +++ b/src/xencons/frontend.c @@ -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,