From: SeongJae Park <sjpark@amazon.com>
To: <stable@vger.kernel.org>
Cc: SeongJae Park <sjpark@amazon.de>, <doebel@amazon.de>,
<aams@amazon.de>, <mku@amazon.de>, <jgross@suse.com>,
<julien@xen.org>, <wipawel@amazon.de>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v3 3/5] xen/xenbus/xen_bus_type: Support will_handle watch callback
Date: Thu, 17 Dec 2020 17:04:00 +0100 [thread overview]
Message-ID: <20201217160402.26303-4-sjpark@amazon.com> (raw)
In-Reply-To: <20201217160402.26303-1-sjpark@amazon.com>
From: SeongJae Park <sjpark@amazon.de>
This commit adds support of the 'will_handle' watch callback for
'xen_bus_type' users.
This is part of XSA-349
This is upstream commit be987200fbaceaef340872841d4f7af2c5ee8dc3
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>
---
drivers/xen/xenbus/xenbus_probe.c | 3 ++-
drivers/xen/xenbus/xenbus_probe.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index c560c1b8489a..ba7590d75985 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -137,7 +137,8 @@ static int watch_otherend(struct xenbus_device *dev)
container_of(dev->dev.bus, struct xen_bus_type, bus);
return xenbus_watch_pathfmt(dev, &dev->otherend_watch,
- NULL, bus->otherend_changed,
+ bus->otherend_will_handle,
+ bus->otherend_changed,
"%s/%s", dev->otherend, "state");
}
diff --git a/drivers/xen/xenbus/xenbus_probe.h b/drivers/xen/xenbus/xenbus_probe.h
index c9ec7ca1f7ab..2c394c6ba605 100644
--- a/drivers/xen/xenbus/xenbus_probe.h
+++ b/drivers/xen/xenbus/xenbus_probe.h
@@ -42,6 +42,8 @@ struct xen_bus_type {
int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
int (*probe)(struct xen_bus_type *bus, const char *type,
const char *dir);
+ bool (*otherend_will_handle)(struct xenbus_watch *watch,
+ const char **vec, unsigned int len);
void (*otherend_changed)(struct xenbus_watch *watch, const char **vec,
unsigned int len);
struct bus_type bus;
--
2.17.1
next prev parent reply other threads:[~2020-12-17 16:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 16:03 [PATCH v3 0/5] Backport of patch series for stable 4.4 branch SeongJae Park
2020-12-17 16:03 ` [PATCH v3 1/5] xen/xenbus: Allow watches discard events before queueing SeongJae Park
2020-12-17 16:03 ` [PATCH v3 2/5] xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() SeongJae Park
2020-12-17 16:04 ` SeongJae Park [this message]
2020-12-17 16:04 ` [PATCH v3 4/5] xen/xenbus: Count pending messages for each watch SeongJae Park
2020-12-17 16:05 ` [PATCH v3 5/5] xenbus/xenbus_backend: Disallow pending watch messages SeongJae Park
2020-12-28 11:29 ` [PATCH v3 0/5] Backport of patch series for stable 4.4 branch Greg KH
2021-01-05 10:37 ` SeongJae Park
2021-01-05 10:43 ` Greg KH
2021-01-05 10:51 ` SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201217160402.26303-4-sjpark@amazon.com \
--to=sjpark@amazon.com \
--cc=aams@amazon.de \
--cc=doebel@amazon.de \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mku@amazon.de \
--cc=sjpark@amazon.de \
--cc=stable@vger.kernel.org \
--cc=wipawel@amazon.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.