diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2019-02-06 02:25:02 +0300 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2019-05-27 17:36:28 +0300 |
commit | fee109901f392a96189bd84a41845535a52bd94d (patch) | |
tree | 88dda887810d94133bb5bce1d5cbc2e872621f1a /drivers/block/drbd/drbd_int.h | |
parent | 82e10af2248d2d09c99834613f1b47d5002dc379 (diff) | |
download | linux-fee109901f392a96189bd84a41845535a52bd94d.tar.xz |
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_int.h')
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 549c64df9708..035829435710 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -1972,7 +1972,7 @@ static inline void wake_ack_receiver(struct drbd_connection *connection) { struct task_struct *task = connection->ack_receiver.task; if (task && get_t_state(&connection->ack_receiver) == RUNNING) - force_sig(SIGXCPU, task); + send_sig(SIGXCPU, task, 1); } static inline void request_ping(struct drbd_connection *connection) |