]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
xenbus: don't bail early from xenbus_dev_request_and_reply()
authorJan Beulich <JBeulich@suse.com>
Thu, 7 Jul 2016 07:32:04 +0000 (01:32 -0600)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 12 Aug 2016 07:07:13 +0000 (09:07 +0200)
commit51d207285c04eeda40d87e647472638885616c78
tree4b17dc2e7aae437a827d194d08584917442c9828
parent2690bd7b805583347ea08c8fea8b220e0aab082d
xenbus: don't bail early from xenbus_dev_request_and_reply()

BugLink: http://bugs.launchpad.net/bugs/1611833
commit 7469be95a487319514adce2304ad2af3553d2fc9 upstream.

xenbus_dev_request_and_reply() needs to track whether a transaction is
open.  For XS_TRANSACTION_START messages it calls transaction_start()
and for XS_TRANSACTION_END messages it calls transaction_end().

If sending an XS_TRANSACTION_START message fails or responds with an
an error, the transaction is not open and transaction_end() must be
called.

If sending an XS_TRANSACTION_END message fails, the transaction is
still open, but if an error response is returned the transaction is
closed.

Commit 027bd7e89906 ("xen/xenbus: Avoid synchronous wait on XenBus
stalling shutdown/restart") introduced a regression where failed
XS_TRANSACTION_START messages were leaving the transaction open.  This
can cause problems with suspend (and migration) as all transactions
must be closed before suspending.

It appears that the problematic change was added accidentally, so just
remove it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/xen/xenbus/xenbus_xs.c