diff options
author | David Vrabel <david.vrabel@citrix.com> | 2012-10-18 11:03:38 +0100 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-30 09:29:07 -0400 |
commit | 2ebb939ab9c6a2484866c5eae4184c83c2b21af8 (patch) | |
tree | 24b5bd880f9ac58c2524620fe08046519bba6219 /drivers/input | |
parent | 01bc825f6311ba2878ae353418eee575d3051594 (diff) | |
download | linux-stable-2ebb939ab9c6a2484866c5eae4184c83c2b21af8.tar.gz linux-stable-2ebb939ab9c6a2484866c5eae4184c83c2b21af8.tar.bz2 linux-stable-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')
-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; |