summaryrefslogtreecommitdiff
path: root/include/xen
diff options
context:
space:
mode:
authorSeongJae Park <sjpark@amazon.de>2020-12-14 12:07:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 13:26:17 +0300
commit85597c4369c9941dd38e47176ff8b540b2b583a3 (patch)
tree93bd2f46c2ef4993fb113e987d0c6eeae106d123 /include/xen
parentb88c52d02e16cd02e51987646bb662a81f8687a6 (diff)
downloadlinux-85597c4369c9941dd38e47176ff8b540b2b583a3.tar.xz
xen/xenbus: Count pending messages for each watch
commit 3dc86ca6b4c8cfcba9da7996189d1b5a358a94fc upstream. This commit adds a counter of pending messages for each watch in the struct. It is used to skip unnecessary pending messages lookup in 'unregister_xenbus_watch()'. It could also be used in 'will_handle' callback. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park <sjpark@amazon.de> Reported-by: Michael Kurth <mku@amazon.de> Reported-by: Pawel Wieczorkiewicz <wipawel@amazon.de> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/xenbus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
index de5ae6c6fa0f..eba01ab5a55e 100644
--- a/include/xen/xenbus.h
+++ b/include/xen/xenbus.h
@@ -59,6 +59,8 @@ struct xenbus_watch
/* Path being watched. */
const char *node;
+ unsigned int nr_pending;
+
/*
* Called just before enqueing new event while a spinlock is held.
* The event will be discarded if this callback returns false.