[PATCH] xenbus: don't look up transaction IDs for ordinary writes

From: Jan Beulich
Date: Mon Aug 15 2016 - 11:02:46 EST


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@xxxxxxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Tested-by: Richard SchÃtz <rschuetz@xxxxxxxxxxxxxx>
---
drivers/xen/xenbus/xenbus_dev_frontend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- 4.8-rc2/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ 4.8-rc2-xen-xenbus-dev-write-oridinary/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -316,7 +316,7 @@ static int xenbus_write_transaction(unsi
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;