Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 8 Sep 2011 23:00:20 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Cyrill Gorcunov <gorcunov@...il.com>
Cc: Vasiliy Kulikov <segoon@...nwall.com>, Tejun Heo <tj@...nel.org>,
        "Kirill A. Shutemov" <kirill@...temov.name>, containers@...ts.osdl.org,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Nathan Lynch
 <ntl@...ox.com>, kernel-hardening@...ts.openwall.com,
        Oren Laadan
 <orenl@...columbia.edu>,
        Daniel Lezcano <dlezcano@...ibm.com>,
        Glauber
 Costa <glommer@...allels.com>,
        James Bottomley <jbottomley@...allels.com>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Al Viro <viro@...IV.linux.org.uk>,
        Pavel Emelyanov <xemul@...allels.com>
Subject: Re: [patch 2/2] fs, proc: Introduce the /proc/<pid>/map_files/
 directory v6

On Fri, 9 Sep 2011 09:48:19 +0400 Cyrill Gorcunov <gorcunov@...il.com> wrote:

> > 
> > <looks at the warning>
> > 
> > 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).

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.