From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [PATCH 01/24] pidns: Remove races by stopping the caching of proc_mnt Date: Fri, 9 Jul 2010 17:13:41 -0500 Message-ID: <20100709221341.GA31259@hallyn.com> References: <20100625192945.GA25532@redhat.com> <20100625212618.GA11917@us.ibm.com> <20100625212758.GA30474@redhat.com> <20100625220713.GA31123@us.ibm.com> <20100709121425.GB18586@hawkmoon.kerlabs.com> <20100709141324.GC18586@hawkmoon.kerlabs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "Eric W. Biederman" Cc: Andrew Morton , Oleg Nesterov , linux-kernel@vger.kernel.org, Louis Rilling , Linux Containers , Sukadev Bhattiprolu , Pavel Emelyanov List-Id: containers.vger.kernel.org Quoting Eric W. Biederman (ebiederm@xmission.com): ... > @@ -2742,13 +2743,13 @@ void proc_flush_task(struct task_struct *task) > > for (i = 0; i <= pid->level; i++) { > upid = &pid->numbers[i]; > - proc_flush_task_mnt(upid->ns->proc_mnt, upid->nr, > - tgid->numbers[i].nr); > - } > + mnt = get_proc_mnt(upid->ns); ... > -int pid_ns_prepare_proc(struct pid_namespace *ns) > +struct vfsmount *get_proc_mnt(struct pid_namespace *ns) > { > - struct vfsmount *mnt; > - > - mnt = kern_mount_data(&proc_fs_type, ns); > - if (IS_ERR(mnt)) > - return PTR_ERR(mnt); > - > - return 0; > + return kern_mount_data(&proc_fs_type, ns); Uh, that looks like it's got to be a *huge* hit. Each kern_mount_data() will at least alloc space for a vfsmnt and proc_fs_type->name. Once for each pid level of each exiting task. (Or am I misreading?) -serge