lkml.org 
[lkml]   [2008]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Runaway loop with the current git.
From
Date
On Sat, 2008-12-06 at 19:11 +0100, Kay Sievers wrote:
> On Sat, Dec 6, 2008 at 17:56, Evgeniy Polyakov <zbr@ioremap.net> wrote:
> > On Sat, Dec 06, 2008 at 05:16:06PM +0100, Kay Sievers (kay.sievers@vrfy.org) wrote:
> >> So the loop is probably a modprobe itself that tries to access
> >> /dev/console. Is there a different argument for the very first
> >> modprobe which is called? Which may be the one that triggers the loop.
> >
> > Hard to tell, I did not see anything but modprobe before and after
> > runaway loop message, but it could be missed though, I will tell
> > for sure only this Monday.
>
> Sounds good.
>
> It seems the /dev/console driver is registered only after all the pci,
> video, acpi, ... drivers, so it's not surprising, that if any of these
> driver in these subsystems calls request_module(), or a process in
> initramfs tries to access the "dead" /dev/console node, things will go
> wrong.

I don't know if it may have any bad side-effects. It moves the tty
registration earlier, before we do pci, framebuffer, video, acpi
registration.

It boots fine here with and without initramfs.

Maybe it makes the "dead" /dev/console in your initramfs working, then
we at least know the problem.

Thanks,
Kay



diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 1412a8d..72bc98f 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3115,26 +3115,14 @@ void __init console_init(void)
}
}

-static int __init tty_class_init(void)
+static struct cdev tty_cdev, console_cdev;
+
+static int __init tty_init(void)
{
tty_class = class_create(THIS_MODULE, "tty");
if (IS_ERR(tty_class))
return PTR_ERR(tty_class);
- return 0;
-}
-
-postcore_initcall(tty_class_init);
-
-/* 3/2004 jmc: why do these devices exist? */

-static struct cdev tty_cdev, console_cdev;
-
-/*
- * Ok, now we can initialize the rest of the tty devices and can count
- * on memory allocations, interrupts etc..
- */
-static int __init tty_init(void)
-{
cdev_init(&tty_cdev, &tty_fops);
if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
@@ -3154,4 +3142,4 @@ static int __init tty_init(void)
#endif
return 0;
}
-module_init(tty_init);
+postcore_initcall(tty_init);



\
 
 \ /
  Last update: 2008-12-06 20:35    [W:0.118 / U:0.340 seconds]
©2003-2014 Jasper Spaans. Advertise on this site