From cbb284d59dcca77fe1e47be4d5dba474d5c798a2 Mon Sep 17 00:00:00 2001 From: Owen Smith Date: Fri, 2 Mar 2018 13:23:37 +0000 Subject: [PATCH] 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 --- src/xencons/frontend.c | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- 2.39.5