linuxtorvalds / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
e293be
commit 9a035a40f7f3f6708b79224b86c5777a3334f7ea
e293be
Author: Jan Beulich <JBeulich@suse.com>
e293be
Date:   Mon Aug 15 09:02:38 2016 -0600
e293be
e293be
    xenbus: don't look up transaction IDs for ordinary writes
e293be
    
e293be
    This should really only be done for XS_TRANSACTION_END messages, or
e293be
    else at least some of the xenstore-* tools don't work anymore.
e293be
    
e293be
    Fixes: 0beef634b8 ("xenbus: don't BUG() on user mode induced condition")
e293be
    Reported-by: Richard Schütz <rschuetz@uni-koblenz.de>
e293be
    Cc: <stable@vger.kernel.org>
e293be
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
e293be
    Tested-by: Richard Schütz <rschuetz@uni-koblenz.de>
e293be
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
e293be
e293be
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
e293be
index 7487971..c1010f01 100644
e293be
--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
e293be
+++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
e293be
@@ -316,7 +316,7 @@ static int xenbus_write_transaction(unsigned msg_type,
e293be
 			rc = -ENOMEM;
e293be
 			goto out;
e293be
 		}
e293be
-	} else {
e293be
+	} else if (msg_type == XS_TRANSACTION_END) {
e293be
 		list_for_each_entry(trans, &u->transactions, list)
e293be
 			if (trans->handle.id == u->u.msg.tx_id)
e293be
 				break;