Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/xenstored: liveupdate: Properly check long transaction
As XenStored is single-threaded, conn->ta_start_time will always be smaller than now. As we substract the latter from the former, it means a transaction will never be considered long running. Invert the two operands of the substraction in both lu_reject_reason() and lu_check_allowed(). In addition to that, the former also needs to check that conn->ta_start_time is not 0 (i.e the transaction is not active). Take the opportunity to document the return condition of lu_check_allowed(). Fixes: e04e53a ("tools/xenstore: allow live update only with no transaction active") Reported-by: Bjoern Doebel <doebel@amazon.de> Signed-off-by: Julien Grall <jgrall@amazon.com> Reviewed-by: Juergen Gross <jgross@suse.com> Release-Acked-by: Ian Jackson <iwj@xenproject.org>
- Loading branch information