* [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs
@ 2014-03-30 12:30 Tejun Heo
2014-03-30 13:13 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2014-03-30 12:30 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Alexandre Demers, linux-kernel
Long ago, sysfs used to depend on vfs data structures for internal
representation and thus needed to make a hidden mount to make them
available. sysfs stopped depending on vfs for internal representation
long ago and 9e30cc959530 ("sysfs, kernfs: no need to kern_mount()
sysfs from sysfs_init()") removed the internal mount.
This doesn't seem to cause wide-spread failure but there is one
failure reported. During boot, userland somehow falls into infinite
loop, fills up one of the filesystems used during boot (possibly a
tmpfs) and then hangs. It isn't yet clear what's going on or why
userland would depend on internal kernel mount of sysfs.
This needs further digging but let's restore the internal mount in the
simplest way.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Alexandre Demers <alexandre.f.demers@gmail.com>
---
fs/sysfs/mount.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index a66ad61..dd6d455 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -75,5 +75,14 @@ int __init sysfs_init(void)
return err;
}
+ /*
+ * XXX: Create an in-kernel mount of sysfs. It isn't clear yet why
+ * this makes any difference; however, there is one report of
+ * userland falling into an infinite loop during boot without it.
+ *
+ * http://lkml.kernel.org/g/CAPEhTTFP3N-ReasmgL5n82mve8p8M3crqmaMvzV+F2p5JCSRbQ@mail.gmail.com
+ */
+ WARN_ON(IS_ERR(kern_mount(&sysfs_fs_type)));
+
return 0;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs
2014-03-30 12:30 [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs Tejun Heo
@ 2014-03-30 13:13 ` Tejun Heo
2014-03-30 16:26 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2014-03-30 13:13 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Alexandre Demers, linux-kernel
Oops, this is not for driver-core-next but driver-core-linus.
Thanks!
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs
2014-03-30 13:13 ` Tejun Heo
@ 2014-03-30 16:26 ` Greg Kroah-Hartman
2014-03-30 22:04 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2014-03-30 16:26 UTC (permalink / raw)
To: Tejun Heo; +Cc: Alexandre Demers, linux-kernel
On Sun, Mar 30, 2014 at 09:13:09AM -0400, Tejun Heo wrote:
> Oops, this is not for driver-core-next but driver-core-linus.
It's _really_ late in the release cycle for something like this, can I
add it to 3.15-rc1 and if people are seeing issues, backport it to
3.14-stable?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs
2014-03-30 16:26 ` Greg Kroah-Hartman
@ 2014-03-30 22:04 ` Tejun Heo
2014-04-02 17:05 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2014-03-30 22:04 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Alexandre Demers, linux-kernel
On Sun, Mar 30, 2014 at 09:26:41AM -0700, Greg Kroah-Hartman wrote:
> On Sun, Mar 30, 2014 at 09:13:09AM -0400, Tejun Heo wrote:
> > Oops, this is not for driver-core-next but driver-core-linus.
>
> It's _really_ late in the release cycle for something like this, can I
> add it to 3.15-rc1 and if people are seeing issues, backport it to
> 3.14-stable?
Sure, the problem doesn't seem to be too widespread anyways.
-stable'ing through rc1 should be fine.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs
2014-03-30 22:04 ` Tejun Heo
@ 2014-04-02 17:05 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2014-04-02 17:05 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Alexandre Demers, linux-kernel
On Sun, Mar 30, 2014 at 06:04:33PM -0400, Tejun Heo wrote:
> On Sun, Mar 30, 2014 at 09:26:41AM -0700, Greg Kroah-Hartman wrote:
> > On Sun, Mar 30, 2014 at 09:13:09AM -0400, Tejun Heo wrote:
> > > Oops, this is not for driver-core-next but driver-core-linus.
> >
> > It's _really_ late in the release cycle for something like this, can I
> > add it to 3.15-rc1 and if people are seeing issues, backport it to
> > 3.14-stable?
>
> Sure, the problem doesn't seem to be too widespread anyways.
> -stable'ing through rc1 should be fine.
Hmmm... Apparently another Arch user is reporting the same problem.
Weird that it's distro specific. Prolly something funky in their
initrd? Anyways, I think this patch needs to be applied with -stable
# v3.14.
Thanks!
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-02 17:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-30 12:30 [PATCH driver-core-next] sysfs: restore in-kernel mount of sysfs Tejun Heo
2014-03-30 13:13 ` Tejun Heo
2014-03-30 16:26 ` Greg Kroah-Hartman
2014-03-30 22:04 ` Tejun Heo
2014-04-02 17:05 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox