Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754953AbZJLIm3 (ORCPT ); Mon, 12 Oct 2009 04:42:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754930AbZJLIm1 (ORCPT ); Mon, 12 Oct 2009 04:42:27 -0400 Received: from mtagate2.uk.ibm.com ([194.196.100.162]:37613 "EHLO mtagate2.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754817AbZJLImZ (ORCPT ); Mon, 12 Oct 2009 04:42:25 -0400 Message-ID: <4AD2EBC7.2020109@fr.ibm.com> Date: Mon, 12 Oct 2009 10:41:43 +0200 From: Daniel Lezcano User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Sukadev Bhattiprolu CC: Linux Kernel Mailing List , andrea@cpushare.com, "Eric W. Biederman" , Linux Containers , Pavel Emelianov Subject: Re: pidns memory leak References: <4AC5F198.2070407@fr.ibm.com> <20091006040526.GA22923@us.ibm.com> <4ACAFD6A.3060008@fr.ibm.com> <20091008030828.GA18973@us.ibm.com> <4ACD9ECC.90508@fr.ibm.com> <20091009032928.GA2031@us.ibm.com> <4ACF381F.9050808@fr.ibm.com> <20091010013235.GA11904@us.ibm.com> In-Reply-To: <20091010013235.GA11904@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1278 Lines: 34 Sukadev Bhattiprolu wrote: > Ccing Andrea's new email id: > > Daniel Lezcano [dlezcano@fr.ibm.com] wrote: > >> Following your explanation I was able to reproduce a simple program >> added in attachment. But there is something I do not understand is why >> the leak does not appear if I do the 'lstat' (cf. test program) in the >> pid 2 context. >> > > Hmm, are you sure there is no leak with this test program ? If I put back > the commit (7766755a2f249e7), I do see a leak in all three data structures > (pid_2, proc_inode, pid_namespace). > Let me clarify :) The program leaks with the commit 7766755a2f249e7 and does not leak without this commit. This is the expected behaviour and this simple program spots the problem. I tried to modify the program and I moved the lstat to the process 2 in the child namespace. Conforming your analysis, I was expecting to see a leak too, but this one didn't occur. I was wondering why, maybe there is something I didn't understood in the analysis. Thanks -- Daniel -- 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/