[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151120211745.GN22011@ZenIV.linux.org.uk>
Date: Fri, 20 Nov 2015 21:17:46 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Scott Wood <scottwood@...escale.com>
Cc: Christophe Leroy <christophe.leroy@....fr>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
LinuxPPC-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
BOUET Serge <serge.bouet@....fr>,
BARABAN Luc <luc.baraban@....fr>
Subject: Re: Recurring Oops in link_path_walk()
On Fri, Nov 20, 2015 at 12:58:40PM -0600, Scott Wood wrote:
> > Looks like garbage in dentry->d_inode, assuming that reconstruction of
> > the mapping of line numbers to addresses is correct... Not sure it is,
> > though; what's more, just how does LR manage to point to the insn right
> > after the call of dput(), of all things?
>
> When "bl dput" is executed, LR gets set to the instruction after the bl.
> After dput returns, LR still has that value. Presumably the call to mntput
> was skipped via the beq. Nothing else modifies LR between the dput return and
> the faulting address.
OK, AFAICS it's this:
604) do {
605) struct path link = *path;
606) void *cookie;
607)
608) res = follow_link(&link, nd, &cookie);
609) if (res)
610) break;
611) res = walk_component(nd, path, LOOKUP_FOLLOW);
612) put_link(nd, &link, cookie);
and we are seeing assorted garbage as link.dentry->d_inode at put_link()
call. What's really interesting, follow_link() has return 0, which means
that it must have passed through
849) *p = dentry->d_inode->i_op->follow_link(dentry, nd);
with
825) struct dentry *dentry = link->dentry;
upstream of that and link as seen by follow_link() is &link as seen by
caller (nested_symlink()); IOW, at that point link.dentry->d_inode used to
be a valid pointer.
Do you have something resembling a reproducer or a chance to get a crash
dump at that point?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists