summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorEric W. Biederman2019-02-06 00:25:02 +0100
committerEric W. Biederman2019-05-27 16:36:28 +0200
commitfee109901f392a96189bd84a41845535a52bd94d (patch)
tree88dda887810d94133bb5bce1d5cbc2e872621f1a /drivers/block/drbd/drbd_main.c
parentsignal/arm64: Use force_sig not force_sig_fault for SIGKILL (diff)
downloadkernel-qcow2-linux-fee109901f392a96189bd84a41845535a52bd94d.tar.gz
kernel-qcow2-linux-fee109901f392a96189bd84a41845535a52bd94d.tar.xz
kernel-qcow2-linux-fee109901f392a96189bd84a41845535a52bd94d.zip
signal/drbd: Use send_sig not force_sig
The drbd module exclusively sends signals to kernel threads it creates with kthread_create. These kernel threads do not block or ignore signals (only flush signals after they have been delivered), nor can drbd threads possibly be pid namespace init processes so the extra work that force_sig performs that send_sig does not is unnecessary. Further force_sig is for delivering synchronous signals (aka exceptions). The locking in force_sig is not prepared to deal with running processes, as tsk->sighand may change during exec for a running process. In short it is not only unnecessary for drbd to use force_sig it is semantically wrong. With drbd using send_sig it becomes easier to maintain force_sig as only synchronous signals need to be considered. Cc: Philipp Reisner <philipp.reisner@linbit.com> Cc: Lars Ellenberg <lars.ellenberg@linbit.com> Cc: drbd-dev@lists.linbit.com Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 714eb64fabfd..8597aefe027b 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -477,7 +477,7 @@ void _drbd_thread_stop(struct drbd_thread *thi, int restart, int wait)
smp_mb();
init_completion(&thi->stop);
if (thi->task != current)
- force_sig(DRBD_SIGKILL, thi->task);
+ send_sig(DRBD_SIGKILL, thi->task, 1);
}
spin_unlock_irqrestore(&thi->t_lock, flags);