Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755423Ab0FXNDt (ORCPT ); Thu, 24 Jun 2010 09:03:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3535 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754810Ab0FXNDr (ORCPT ); Thu, 24 Jun 2010 09:03:47 -0400 Date: Thu, 24 Jun 2010 15:01:11 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Andrew Morton , Louis Rilling , Pavel Emelyanov , Linux Containers , linux-kernel@vger.kernel.org, Sukadev Bhattiprolu Subject: Re: [PATCH 1/1] pid_ns: move pid_ns_release_proc() from proc_flush_task() to zap_pid_ns_processes() Message-ID: <20100624130111.GB7257@redhat.com> References: <20100618082033.GD16877@hawkmoon.kerlabs.com> <20100618111554.GA3252@redhat.com> <20100618160849.GA7404@redhat.com> <20100618173320.GG16877@hawkmoon.kerlabs.com> <20100618175541.GA13680@redhat.com> <20100618212355.GA29478@redhat.com> <20100619190840.GA3424@redhat.com> <20100623203652.GA25298@redhat.com> <20100623203735.GB25298@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 998 Lines: 30 On 06/24, Eric W. Biederman wrote: > > Oleg Nesterov writes: > > > This is mostly cleanup and optimization, but also fixes the bug. > > Oleg with respect to your other patches I think they are some of > the best ones we have on the table. > > > proc_flush_task() checks upid->nr == 1 to detect the case when > > a sub-namespace exits. However, this doesn't work in case when > > a multithreaded init execs and calls release_task(old_leader), > > the old leader has the same pid 1. > > > > Move pid_ns_release_proc() to zap_pid_ns_processes(), it is called > > when we know for sure that init is exiting. > > This actually guarantees a use after free for the namespace init: Yes, thanks. I am stupid. Please ignore the patch. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/