From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jeremiah Mahler <jmmahler@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [BUG, linux-next] spawn PID 1 without CLONE_FS, wireless inop
Date: Tue, 16 Dec 2014 13:28:21 +0000 [thread overview]
Message-ID: <20141216132821.GA22149@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20141216125615.GZ22149@ZenIV.linux.org.uk>
On Tue, Dec 16, 2014 at 12:56:15PM +0000, Al Viro wrote:
> On Tue, Dec 16, 2014 at 03:55:37AM -0800, Jeremiah Mahler wrote:
> > all,
> >
> > The wireless network interface has become inoperative when running
> > linux-next 20141216 on a Lenovo Carbon X1. It is completely
> > non-existent and `ip addr` doesn't show it. A bisect has found that
> > the bug was introduced by the following commit.
>
> Very interesting. What userland are you running? I take it, the root
> filesystem is mounted and system boot except for that interface not
> coming up, right?
>
> Your card is normally handled by what, iwlwifi? What happens upon
> modprobe iwlwifi (or whatever module you see loaded on the normal
> boot)? Another interesting question is whether it manages to load
> the firmware... What happens if you boot with debug in kernel command
> line, with working and with non-working kernels resp.?
Hmm... OK, I think I see what might be going on. On the testbox here
I've got pivot_root(2) done from /init on initramfs. And that triggers
chroot_fs_refs(), which switches init_fs.{root,pwd} to the final rootfs.
In your case it apparently isn't triggered (different userland or setup,
perhaps) and init_fs is left behind on initramfs. With some files
(firmware?) not being there... Could you check if the following kludge
helps? It's not intended as a solution, I just want to verify that guess
about the mechanism of the problem...
diff --git a/init/main.c b/init/main.c
index 3a169a2..36c29d6 100644
--- a/init/main.c
+++ b/init/main.c
@@ -80,6 +80,8 @@
#include <linux/list.h>
#include <linux/proc_ns.h>
#include <linux/fs_struct.h>
+#include "../fs/internal.h" // HACK
+#include <linux/init_task.h> // HACK
#include <asm/io.h>
#include <asm/bugs.h>
@@ -1024,6 +1026,15 @@ static noinline void __init kernel_init_freeable(void)
if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) {
ramdisk_execute_command = NULL;
prepare_namespace();
+ {
+ /* HACK */
+ struct path old, new;
+ get_fs_root(current->fs, &new);
+ get_fs_root(&init_fs, &old);
+ chroot_fs_refs(&old, &new);
+ path_put(&old);
+ path_put(&new);
+ }
}
/*
next prev parent reply other threads:[~2014-12-16 13:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 11:55 [BUG, linux-next] spawn PID 1 without CLONE_FS, wireless inop Jeremiah Mahler
2014-12-16 12:56 ` Al Viro
2014-12-16 13:28 ` Al Viro [this message]
2014-12-16 14:09 ` Jeremiah Mahler
2014-12-16 14:25 ` Al Viro
2014-12-16 14:46 ` Jeremiah Mahler
2014-12-16 15:05 ` Al Viro
2014-12-16 15:26 ` Jeremiah Mahler
2014-12-16 16:27 ` Al Viro
2014-12-16 20:03 ` Jeremiah Mahler
2014-12-17 13:17 ` Takashi Iwai
2014-12-17 14:54 ` Jeremiah Mahler
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=20141216132821.GA22149@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=jmmahler@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).