summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2016-08-15 09:02:38 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-15 08:20:28 +0200
commitb035f15daf750e1594964d68889e0de5c3014922 (patch)
tree9ca19f17d99db9c6980638fc3224f506f66d4395
parent986b9db8f93e8f702a3c542f20f8c2e24e1dc1e2 (diff)
downloadlinux-stable-b035f15daf750e1594964d68889e0de5c3014922.tar.gz
linux-stable-b035f15daf750e1594964d68889e0de5c3014922.tar.bz2
linux-stable-b035f15daf750e1594964d68889e0de5c3014922.zip
xenbus: don't look up transaction IDs for ordinary writes
commit 9a035a40f7f3f6708b79224b86c5777a3334f7ea upstream. This should really only be done for XS_TRANSACTION_END messages, or else at least some of the xenstore-* tools don't work anymore. Fixes: 0beef634b8 ("xenbus: don't BUG() on user mode induced condition") Reported-by: Richard Schütz <rschuetz@uni-koblenz.de> Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Richard Schütz <rschuetz@uni-koblenz.de> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/xen/xenbus/xenbus_dev_frontend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
index 7487971f9f78..c1010f018bd8 100644
--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -316,7 +316,7 @@ static int xenbus_write_transaction(unsigned msg_type,
rc = -ENOMEM;
goto out;
}
- } else {
+ } else if (msg_type == XS_TRANSACTION_END) {
list_for_each_entry(trans, &u->transactions, list)
if (trans->handle.id == u->u.msg.tx_id)
break;