[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen stable-4.12] tools/ocaml/xenstored: ignore transaction id for [un]watch
commit f8443e804c2ab0ae0f8fea7df00c0d51da2f34a1 Author: Edwin Török <edvin.torok@xxxxxxxxxx> AuthorDate: Tue Dec 15 14:28:59 2020 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Dec 15 14:28:59 2020 +0100 tools/ocaml/xenstored: ignore transaction id for [un]watch Instead of ignoring the transaction id for XS_WATCH and XS_UNWATCH commands as it is documented in docs/misc/xenstore.txt, it is tested for validity today. Really ignore the transaction id for XS_WATCH and XS_UNWATCH. This is part of XSA-115. Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx> Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/ocaml/xenstored/process.ml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/ocaml/xenstored/process.ml b/tools/ocaml/xenstored/process.ml index 8a7e538893..fb0a6d47c3 100644 --- a/tools/ocaml/xenstored/process.ml +++ b/tools/ocaml/xenstored/process.ml @@ -492,12 +492,19 @@ let retain_op_in_history ty = | Xenbus.Xb.Op.Reset_watches | Xenbus.Xb.Op.Invalid -> false +let maybe_ignore_transaction = function + | Xenbus.Xb.Op.Watch | Xenbus.Xb.Op.Unwatch -> fun tid -> + if tid <> Transaction.none then + debug "Ignoring transaction ID %d for watch/unwatch" tid; + Transaction.none + | _ -> fun x -> x + (** * Nothrow guarantee. *) let process_packet ~store ~cons ~doms ~con ~req = let ty = req.Packet.ty in - let tid = req.Packet.tid in + let tid = maybe_ignore_transaction ty req.Packet.tid in let rid = req.Packet.rid in try let fct = function_of_type ty in -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.12
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |