tools/xenstore: fire watches only when removing a specific node
authorJuergen Gross <jgross@suse.com>
Thu, 11 Jun 2020 14:12:43 +0000 (16:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Dec 2020 13:06:07 +0000 (14:06 +0100)
commit3d0e1a15b31b690018e57547c6b82f442b1cbc76
tree8ae754a701aeb649ad8be1404177d9149c4fd1b4
parent117521e9c099d92f60753ff2bb30d97eef6e8137
tools/xenstore: fire watches only when removing a specific node

Instead of firing all watches for removing a subtree in one go, do so
only when the related node is being removed.

The watches for the top-most node being removed include all watches
including that node, while watches for nodes below that are only fired
if they are matching exactly. This avoids firing any watch more than
once when removing a subtree.

This is part of XSA-115.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Paul Durrant <paul@xen.org>
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_watch.c
tools/xenstore/xenstored_watch.h