linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Sabrina Dubroca <sd@queasysnail.net>,
	Guenter Roeck <linux@roeck-us.net>,
	Paul Moore <pmoore@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-audit@redhat.com,
	Richard Guy Briggs <rgb@redhat.com>
Subject: Re: linux-next: Tree for Jan 20 -- Kernel panic - Unable to mount root fs
Date: Wed, 21 Jan 2015 15:42:16 +0100	[thread overview]
Message-ID: <20150121144214.GA22884@ulmo.nvidia.com> (raw)
In-Reply-To: <20150121110539.GA8924@kria>

[-- Attachment #1: Type: text/plain, Size: 2876 bytes --]

On Wed, Jan 21, 2015 at 12:05:39PM +0100, Sabrina Dubroca wrote:
> 2015-01-21, 04:36:38 +0000, Al Viro wrote:
> > On Tue, Jan 20, 2015 at 08:01:26PM -0800, Guenter Roeck wrote:
> > > With this patch:
> > > 
> > > sys_mkdir .:40775 returned -17
> > > sys_mkdir usr:40775 returned 0
> > > sys_mkdir usr/lib:40775 returned 0
> > > sys_mkdir usr/share:40755 returned 0
> > > sys_mkdir usr/share/udhcpc:40755 returned 0
> > > sys_mkdir usr/bin:40775 returned 0
> > > sys_mkdir usr/sbin:40775 returned 0
> > > sys_mkdir mnt:40775 returned 0
> > > sys_mkdir proc:40775 returned 0
> > > sys_mkdir root:40775 returned 0
> > > sys_mkdir lib:40775 returned 0
> > > sys_mkdir lib/modules:40775 returned 0
> > > ...
> > > 
> > > and the problem is fixed.
> 
> This patch also works for me.
> 
> 
> > ... except that it simply confirms that something's fishy with getname_kernel()
> > of ->name of struct filename returned by getname().  IOW, I still do not
> > understand the mechanism of breakage there.
> 
> I'm not so sure about that.  I tried to copy name to a new string in
> do_path_lookup and that didn't help.
> 
> Now, I've removed the
> 
>         putname(filename);
> 
> line from do_path_lookup and I don't get the panic.

That would indicate that somehow the refcount got unbalanced. Looking
more closely it seems like the various audit_*() function do take a
reference, but maybe that's not enough.

But debugging this further I see no indication that the memory is ever
freed, or otherwise corrupted.

I did collect a bit more data, perhaps that's useful. I started seeing
this issue as well on devices that boot over NFS. After reading this
thread I also realized that another warning that I was seeing might be
related:

	[   28.261930] Warning: unable to open an initial console.

I've added a couple of printks and see that the reason for this is that
/dev/console doesn't get created. /dev however does get created.

	[   11.786627] sys_mkdir dev:40755 returned 0
	...
	[   11.978748] sys_mknod dev/console:20600 returned -2

The chain that fails turns out to be this:

	sys_mknod()
	  sys_mknodat()
	    user_path_create()
	      kern_path_create()
	        do_path_lookup()
	          filename_lookup()
	            path_lookupat()
	              path_init()
	                link_path_walk()
	                  walk_component()

walk_components() ends up calling lookup_slow() and the result is that
inode == NULL and d_is_negative(path->dentry) returns true, therefore
causing -ENOENT to be returned.

I tried to figure out why inode would be NULL at that point or why
d_is_negative() returned true, but I ended up getting completely lost,
so I thought it best to report my findings before I confuse everything.

Is there anything else I can investigate to track this down?

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-01-21 14:42 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150120185308.53f4af4e@canb.auug.org.au>
2015-01-20 16:56 ` linux-next: Tree for Jan 20 -- Kernel panic - Unable to mount root fs Sabrina Dubroca
2015-01-20 17:39   ` Paul Moore
2015-01-20 17:51     ` Sabrina Dubroca
2015-01-20 19:54       ` Al Viro
2015-01-20 20:45         ` Sabrina Dubroca
2015-01-20 21:02           ` Al Viro
2015-01-20 21:38             ` Sabrina Dubroca
2015-01-20 21:58               ` Al Viro
2015-01-20 22:08                 ` Sabrina Dubroca
2015-01-20 22:13                   ` Guenter Roeck
2015-01-20 22:50                     ` Al Viro
2015-01-20 23:17                       ` Al Viro
2015-01-20 23:27                         ` Sabrina Dubroca
2015-01-21  0:04                           ` Paul Moore
2015-01-21  0:14                             ` Paul Moore
2015-01-21  0:41                               ` Al Viro
2015-01-21  2:44                                 ` Guenter Roeck
2015-01-21  3:36                                   ` Al Viro
2015-01-21  4:01                                     ` Guenter Roeck
2015-01-21  4:36                                       ` Al Viro
2015-01-21 11:05                                         ` Sabrina Dubroca
2015-01-21 13:32                                           ` Guenter Roeck
2015-01-21 18:29                                             ` Al Viro
2015-01-21 19:06                                               ` Guenter Roeck
2015-01-21 20:06                                                 ` Al Viro
2015-01-21 21:03                                                   ` Guenter Roeck
2015-01-21 21:28                                                     ` Al Viro
2015-01-21 21:38                                                       ` Guenter Roeck
2015-01-21 21:40                                                       ` Sabrina Dubroca
2015-01-21 21:54                                                       ` Paul Walmsley
2015-01-22  2:28                                                       ` Paul Moore
2015-01-22  4:12                                                         ` Al Viro
2015-01-22  4:49                                                           ` Paul Moore
2015-01-21 21:30                                                     ` Sabrina Dubroca
2015-01-21 14:42                                           ` Thierry Reding [this message]
2015-01-21 15:24                                             ` Paul Moore
2015-01-21 15:39                                               ` Thierry Reding
2015-01-21 15:54                                                 ` Sabrina Dubroca
2015-01-21 16:16                                                   ` Paul Moore
2015-01-21 17:38                                                     ` Al Viro
2015-01-21 17:51                                                       ` Guenter Roeck
2015-01-21 16:21                                                   ` Guenter Roeck
2015-01-21 15:06                                         ` Paul Moore
2015-01-20 21:43             ` Guenter Roeck
2015-01-20 17:54     ` Fabio Estevam
2015-01-20 19:00       ` Ross Zwisler
2015-01-20 19:16         ` Fabio Estevam
2015-01-20 19:24           ` Paul Moore
2015-01-20 19:43             ` Fabio Estevam
2015-01-20 20:10               ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150121144214.GA22884@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pmoore@redhat.com \
    --cc=rgb@redhat.com \
    --cc=sd@queasysnail.net \
    --cc=sfr@canb.auug.org.au \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).