[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190729083248.30362-1-christoph.boehmwalder@linbit.com>
Date: Mon, 29 Jul 2019 10:32:48 +0200
From: Christoph Böhmwalder
<christoph.boehmwalder@...bit.com>
To: linux-kernel@...r.kernel.org
Cc: "Eric W . Biederman" <ebiederm@...ssion.com>,
Jens Axboe <axboe@...nel.dk>,
Christoph Böhmwalder
<christoph.boehmwalder@...bit.com>,
Philipp Reisner <philipp.reisner@...bit.com>,
stable@...r.kernel.org
Subject: [PATCH] drbd: do not ignore signals in threads
Fix a regression introduced by upstream commit fee109901f39
('signal/drbd: Use send_sig not force_sig').
Currently, when a thread is initialized, all signals are set to be
ignored by default. DRBD uses SIGHUP to end its threads, which means it
is now no longer possible to bring down a DRBD resource because the
signals do not make it through to the thread in question.
This circumstance was previously hidden by the fact that DRBD used
force_sig() to kill its threads. The aforementioned upstream commit
changed this to send_sig(), which means the effects of the signals being
ignored by default are now becoming visible.
Thus, issue an allow_signal() at the start of the thread to explicitly
allow the desired signals.
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@...bit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@...bit.com>
Fixes: fee109901f39 ("signal/drbd: Use send_sig not force_sig")
Cc: stable@...r.kernel.org
---
drivers/block/drbd/drbd_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 9bd4ddd12b25..b8b986df6814 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -318,6 +318,9 @@ static int drbd_thread_setup(void *arg)
unsigned long flags;
int retval;
+ allow_signal(DRBD_SIGKILL);
+ allow_signal(SIGXCPU);
+
snprintf(current->comm, sizeof(current->comm), "drbd_%c_%s",
thi->name[0],
resource->name);
--
2.22.0
Powered by blists - more mailing lists