From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [patch 2/2] fs, proc: Introduce the /proc//map_files/ directory v6 Date: Thu, 8 Sep 2011 23:00:20 -0700 Message-ID: <20110908230020.11f306be.akpm@linux-foundation.org> 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> <20110909054819.GN28162@sun> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Cyrill Gorcunov Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:40448 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758390Ab1IIF4Y (ORCPT ); Fri, 9 Sep 2011 01:56:24 -0400 In-Reply-To: <20110909054819.GN28162@sun> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 9 Sep 2011 09:48:19 +0400 Cyrill Gorcunov wrote: > > > > > > > > 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? Nope, sorry - we're dead in the water at present. > 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). The warning is from ei->op.proc_get_link = proc_map_files_get_link; The lhs has type union proc_op { int (*proc_get_link)(struct inode *, struct path *); and the rhs has type static int proc_map_files_get_link(struct dentry *dentry, struct path *path) So we end up passing an inode* to a function which expects a dentry*. That's in 3.1-rc4. proc_op.proc_get_link() hasn't changed since 3.0 (at least).