From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [patch 2/2] fs, proc: Introduce the /proc//map_files/ directory v6 Date: Fri, 9 Sep 2011 09:48:19 +0400 Message-ID: <20110909054819.GN28162@sun> References: <20110906173341.GM18425@mtj.dyndns.org> <20110907112301.GA12157@albatros> <20110907215329.GB28162@sun> <20110907151323.613e62e7.akpm@linux-foundation.org> <20110907224234.GD28162@sun> <20110907155332.beda7d3d.akpm@linux-foundation.org> <20110908054826.GF28162@sun> <20110908055025.GG28162@sun> <20110908060405.GH28162@sun> <20110908165201.59e82c71.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Vasiliy Kulikov , Tejun Heo , "Kirill A. Shutemov" , containers@lists.osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Nathan Lynch , kernel-hardening@lists.openwall.com, Oren Laadan , Daniel Lezcano , Glauber Costa , James Bottomley , Alexey Dobriyan , Al Viro , Pavel Emelyanov To: Andrew Morton Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:46062 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757775Ab1IIFs1 (ORCPT ); Fri, 9 Sep 2011 01:48:27 -0400 Content-Disposition: inline In-Reply-To: <20110908165201.59e82c71.akpm@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Sep 08, 2011 at 04:52:01PM -0700, Andrew Morton wrote: > On Thu, 8 Sep 2011 10:04:05 +0400 > Cyrill Gorcunov wrote: > > > fs, proc: Introduce the /proc//map_files/ directory v11 > > Ho hum, I've pretty much run out of excuses to avoid merging this. > > except... > > We don't really want to bloat fs/proc/base.o by 4k until all the other > things which support c/r are mergeable and we know that the whole > project is actually useful. When will we be at this stage? I hope we will bring in a final set in a couple of weeks. > > > > fs/proc/base.c: In function 'proc_map_files_instantiate': > fs/proc/base.c:2348: warning: assignment from incompatible pointer type > > err, that code will crash at runtime and it isn't trivial to fix. > How could this happen? > Hmm. I never saw this warning. (Andrew, I'm still unable to fetch your current -mm tree, is there some place other than kernel.org? So the patch is done on top of 3.1-rc3). I guess this warrning is from p = flex_array_get(fa, i); ? (since I don't have any warning at all). > > > > ... > > > > + if (fa) > > + flex_array_free(fa); > > > > ... > > > > + if (fa) > > + flex_array_free(fa); > > I think I'll do this: > > From: Andrew Morton > > Lots of callers are avoiding passing NULL into flex_array_free(). Move > the check into flex_array_free() in the usual fashion. > > Cc: Stephen Smalley > Cc: James Morris > Cc: Cyrill Gorcunov > Signed-off-by: Andrew Morton > --- Yeah, great. Moreover, flex_array_free calls for kfree which support NULL argument so it's natural to make this one NULL capable as well. Cyrill