lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 24 Jul 2019 18:53:39 +0200
From:   Christian Brauner <christian@...uner.io>
To:     "Joel Fernandes (Google)" <joel@...lfernandes.org>,
        linux-kernel@...r.kernel.org
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH] pidfd: Add warning if exit_state is 0 during notification

On July 24, 2019 6:48:16 PM GMT+02:00, "Joel Fernandes (Google)" <joel@...lfernandes.org> wrote:
>Previously a condition got missed where the pidfd waiters are awakened
>before the exit_state gets set. This can result in a missed
>notification
>[1] and the polling thread waiting forever.
>
>It is fixed now, however it would be nice to avoid this kind of issue
>going unnoticed in the future. So just add a warning to catch it in the
>future.
>
>[1]
>https://lore.kernel.org/lkml/20190717172100.261204-1-joel@joelfernandes.org/
>
>Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
>---
> kernel/signal.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/kernel/signal.c b/kernel/signal.c
>index 91b789dd6e72..349f5a67f100 100644
>--- a/kernel/signal.c
>+++ b/kernel/signal.c
>@@ -1885,6 +1885,7 @@ static void do_notify_pidfd(struct task_struct
>*task)
> {
> 	struct pid *pid;
> 
>+	WARN_ON(task->exit_state == 0);
> 	pid = task_pid(task);
> 	wake_up_all(&pid->wait_pidfd);
> }

Makes sense to me.
I'm picking this up unless someone sees a problem with this patch.

Reviewed-by: Christian Brauner <christian@...uner.io>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ