diff options
author | David Vrabel <david.vrabel@citrix.com> | 2012-10-18 12:03:38 +0200 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-30 14:29:07 +0100 |
commit | 2ebb939ab9c6a2484866c5eae4184c83c2b21af8 (patch) | |
tree | 24b5bd880f9ac58c2524620fe08046519bba6219 /drivers/input/misc | |
parent | xen-fbfront: handle backend CLOSED without CLOSING (diff) | |
download | linux-2ebb939ab9c6a2484866c5eae4184c83c2b21af8.tar.xz linux-2ebb939ab9c6a2484866c5eae4184c83c2b21af8.zip |
xen-kbdfront: 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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/xen-kbdfront.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 02ca8680ea5b..6f7d99013031 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c @@ -311,7 +311,6 @@ static void xenkbd_backend_changed(struct xenbus_device *dev, case XenbusStateReconfiguring: case XenbusStateReconfigured: case XenbusStateUnknown: - case XenbusStateClosed: break; case XenbusStateInitWait: @@ -350,6 +349,10 @@ InitWait: break; + case XenbusStateClosed: + if (dev->state == XenbusStateClosed) + break; + /* Missed the backend's CLOSING state -- fallthrough */ case XenbusStateClosing: xenbus_frontend_closed(dev); break; |