|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH xenvif] Don't allow a frontend to go from Closed to Initialising...
From: Paul Durrant <pdurrant@xxxxxxxxxx>
... if the backend is offline.
It's possible for the enumeration thread to spot a device that is in the
process of being removed. In this case the 'online' node in the backend
XenStore area will be 0 and devices in this state should remain Closed.
Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
src/xenvif/frontend.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c
index 7ea66cf73610..dab0ebbec0e4 100644
--- a/src/xenvif/frontend.c
+++ b/src/xenvif/frontend.c
@@ -1548,8 +1548,12 @@ FrontendPrepare(
break;
case XenbusStateClosed:
- FrontendSetXenbusState(Frontend,
- XenbusStateInitialising);
+ if (FrontendIsBackendOnline(Frontend))
+ FrontendSetXenbusState(Frontend,
+ XenbusStateInitialising);
+ else
+ FrontendSetOffline(Frontend);
+
break;
case XenbusStateConnected:
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |