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]
Message-ID: <87eh8pknir.fsf@xmission.com>
Date:	Mon, 16 Sep 2013 04:35:08 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Serge E. Hallyn" <serge@...lyn.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] pidns: fix free_pid() to handle the first fork failure

Oleg Nesterov <oleg@...hat.com> writes:

> "case 0" in free_pid() assumes that disable_pid_allocation() should
> clear PIDNS_HASH_ADDING before the last pid goes away. However this
> doesn't happen if the 1st fork() fails to create the child reaper
> which should call disable_pid_allocation().

Reviewed-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---

I am not really setup to do deal with bug fixes, inbetween releases but
if Andrew doesn't grab this I will toss this in my tree for 3.13.

Eric

>  kernel/pid.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/pid.c b/kernel/pid.c
> index 66505c1..606a212 100644
> --- a/kernel/pid.c
> +++ b/kernel/pid.c
> @@ -272,6 +272,11 @@ void free_pid(struct pid *pid)
>  			 */
>  			wake_up_process(ns->child_reaper);
>  			break;
> +		case PIDNS_HASH_ADDING:
> +			/* Handle a fork failure of the first process */
> +			WARN_ON(ns->child_reaper);
> +			ns->nr_hashed = 0;
> +			/* fall through */
>  		case 0:
>  			schedule_work(&ns->proc_work);
>  			break;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ