Re: [PATCH] kernel/signal: Modify the comment of function check_kill_permission

From: Christian Brauner
Date: Tue Mar 23 2021 - 05:00:36 EST


On Tue, Mar 23, 2021 at 01:03:56AM -0700, zhouchuangao wrote:
> Maybe it's easier for us to understand the function of
> check_kill_permission.
>
> Signed-off-by: zhouchuangao <zhouchuangao@xxxxxxxx>
> ---
> kernel/signal.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index f2a1b89..2fbf68a 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -823,8 +823,10 @@ static bool kill_ok_by_cred(struct task_struct *t)
> }
>
> /*
> - * Bad permissions for sending the signal
> - * - the caller must hold the RCU read lock
> + * Check if the signal has permission to kill the process.

Hey,

This phrasing is misleading imho. It's not about whether the signal has
permission but whether the caller has permissions to send the signal.

Christian