linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drbd: do not ignore signals in threads
@ 2019-07-29  8:32 Christoph Böhmwalder
  2019-07-29  8:50 ` David Laight
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Böhmwalder @ 2019-07-29  8:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Eric W . Biederman, Jens Axboe, Christoph Böhmwalder,
	Philipp Reisner, stable

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@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Fixes: fee109901f39 ("signal/drbd: Use send_sig not force_sig")
Cc: stable@vger.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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-08-19 23:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29  8:32 [PATCH] drbd: do not ignore signals in threads Christoph Böhmwalder
2019-07-29  8:50 ` David Laight
2019-08-05  9:33   ` Christoph Böhmwalder
2019-08-05  9:41     ` David Laight
2019-08-12 11:52       ` Philipp Reisner
2019-08-12 13:12         ` David Laight
2019-08-12 13:28           ` Philipp Reisner
2019-08-16 22:19             ` [PATCH] signal: Allow cifs and drbd to receive their terminating signals Eric W. Biederman
2019-08-19  8:37               ` Christoph Böhmwalder
2019-08-19 22:03                 ` [GIT PULL] " Eric W. Biederman
2019-08-19 23:35                   ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).