[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201209101114.31522-1-jgross@suse.com>
Date: Wed, 9 Dec 2020 11:11:14 +0100
From: Juergen Gross <jgross@...e.com>
To: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Cc: Juergen Gross <jgross@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Stefano Stabellini <sstabellini@...nel.org>
Subject: [PATCH] xen/xenbus: make xs_talkv() interruptible for SIGKILL
In case a process waits for any Xenstore action in the xenbus driver
it should be interruptible via SIGKILL.
Signed-off-by: Juergen Gross <jgross@...e.com>
---
drivers/xen/xenbus/xenbus_xs.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 3a06eb699f33..1f4d3593e89e 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -205,8 +205,15 @@ static bool test_reply(struct xb_req_data *req)
static void *read_reply(struct xb_req_data *req)
{
+ int ret;
+
do {
- wait_event(req->wq, test_reply(req));
+ ret = wait_event_interruptible(req->wq, test_reply(req));
+
+ if (ret == -ERESTARTSYS && fatal_signal_pending(current)) {
+ req->msg.type = XS_ERROR;
+ return ERR_PTR(-EINTR);
+ }
if (!xenbus_ok())
/*
--
2.26.2
Powered by blists - more mailing lists