Re: [PATCH v3] posix-timers: Prefer delivery of signals to the current thread

From: Oleg Nesterov
Date: Thu Jan 26 2023 - 09:47:55 EST


On 01/26, Dmitry Vyukov wrote:
>
> t = pid_task(pid, type);
> + if (t && type != PIDTYPE_PID && same_thread_group(t, current))
> + t = current;
> if (!t || !likely(lock_task_sighand(t, &flags)))
> goto ret;

Feel free to ignore, this is cosmetic/subjective, but

t = pid_task(pid, type);
if (!t)
goto ret;
if (type == PIDTYPE_TGID && same_thread_group(t, current))
t = current;
if (!likely(lock_task_sighand(t, &flags)))
goto ret;

looks a bit more readable/clean to me.

LGTM. Lets wait for Thomas verdict.

Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>