فهرست منبع

xen-fbfront: handle backend CLOSED without CLOSING

Backend drivers shouldn't transistion to CLOSED unless the frontend is
CLOSED.  If a backend does transition to CLOSED too soon then the
frontend may not see the CLOSING state and will not properly shutdown.

So, treat an unexpected backend CLOSED state the same as CLOSING.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
David Vrabel 13 سال پیش
والد
کامیت
01bc825f63
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      drivers/video/xen-fbfront.c

+ 4 - 1
drivers/video/xen-fbfront.c

@@ -641,7 +641,6 @@ static void xenfb_backend_changed(struct xenbus_device *dev,
 	case XenbusStateReconfiguring:
 	case XenbusStateReconfiguring:
 	case XenbusStateReconfigured:
 	case XenbusStateReconfigured:
 	case XenbusStateUnknown:
 	case XenbusStateUnknown:
-	case XenbusStateClosed:
 		break;
 		break;
 
 
 	case XenbusStateInitWait:
 	case XenbusStateInitWait:
@@ -670,6 +669,10 @@ InitWait:
 		info->feature_resize = val;
 		info->feature_resize = val;
 		break;
 		break;
 
 
+	case XenbusStateClosed:
+		if (dev->state == XenbusStateClosed)
+			break;
+		/* Missed the backend's CLOSING state -- fallthrough */
 	case XenbusStateClosing:
 	case XenbusStateClosing:
 		xenbus_frontend_closed(dev);
 		xenbus_frontend_closed(dev);
 		break;
 		break;