diff options
author | SeongJae Park <sjpark@amazon.de> | 2020-12-14 10:07:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 11:54:27 +0100 |
commit | 1a72241aabcbb19b52be6f009423e5782b87a09e (patch) | |
tree | 8096c335de78ba5f519615bfcd1343796bf3e736 /include/xen/xenbus.h | |
parent | 6835334e154652858651ac6336e71290e0cc1396 (diff) | |
download | kernel_replicant_linux-1a72241aabcbb19b52be6f009423e5782b87a09e.tar.gz kernel_replicant_linux-1a72241aabcbb19b52be6f009423e5782b87a09e.tar.bz2 kernel_replicant_linux-1a72241aabcbb19b52be6f009423e5782b87a09e.zip |
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/xenbus.h')
-rw-r--r-- | include/xen/xenbus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index c8574d1b814c..00c7235ae93e 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h @@ -61,6 +61,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. |