public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: Runaway loop with the current git.
Date: Sat, 06 Dec 2008 20:32:06 +0100	[thread overview]
Message-ID: <1228591926.3808.6.camel@nga> (raw)
In-Reply-To: <ac3eb2510812061011u7a7f0fbdtc46b95a9c642f9c7@mail.gmail.com>

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);



  reply	other threads:[~2008-12-06 19:32 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05 18:03 Runaway loop with the current git Evgeniy Polyakov
2008-12-05 18:16 ` Alan Cox
2008-12-05 18:32   ` Kay Sievers
2008-12-05 19:27     ` Evgeniy Polyakov
2008-12-05 19:34       ` Alan Cox
2008-12-05 21:12         ` Evgeniy Polyakov
2008-12-05 21:17           ` Kay Sievers
2008-12-05 21:24             ` Evgeniy Polyakov
2008-12-06  2:10               ` Kay Sievers
2008-12-06 16:09                 ` Evgeniy Polyakov
2008-12-06 16:16                   ` Kay Sievers
2008-12-06 16:56                     ` Evgeniy Polyakov
2008-12-06 18:11                       ` Kay Sievers
2008-12-06 19:32                         ` Kay Sievers [this message]
2008-12-06 20:26                           ` Evgeniy Polyakov
2008-12-07  3:56                             ` Kay Sievers
2008-12-07  4:31                               ` Evgeniy Polyakov
2008-12-07 11:23                               ` Alan Cox
2008-12-07 11:45                                 ` Evgeniy Polyakov
2008-12-07 11:58                                   ` Alan Cox
2008-12-07 13:10                                     ` Evgeniy Polyakov
2008-12-07 14:02                                 ` Kay Sievers
2008-12-07 15:08                                   ` Alan Cox
2008-12-07 14:49                                 ` Herbert Xu
2008-12-07 15:14                                   ` Alan Cox
2008-12-07 15:55                                   ` Herbert Xu
2008-12-07 16:03                                     ` Kay Sievers
2008-12-07 16:09                                       ` Alan Cox
2008-12-07 16:21                                         ` Kay Sievers
2008-12-07 16:57                                           ` Alan Cox
2008-12-07 17:03                                             ` Evgeniy Polyakov
2008-12-07 17:24                                               ` Alan Cox
2008-12-07 17:29                                                 ` Evgeniy Polyakov
2008-12-07 16:31                                         ` Evgeniy Polyakov
2008-12-07 17:01                                           ` Alan Cox
2008-12-07 17:13                                             ` Evgeniy Polyakov
2008-12-07 17:17                                             ` Kay Sievers
2008-12-07 17:22                                             ` Kay Sievers
2008-12-07 17:28                                               ` Alan Cox
2008-12-07 17:39                                                 ` Kay Sievers
2008-12-07 17:51                                                   ` Alan Cox
2008-12-07 18:22                                                     ` Kay Sievers
2008-12-08  3:23                                                       ` Valdis.Kletnieks
2008-12-08  3:56                                                         ` Kay Sievers
2008-12-07 17:44                                                 ` Evgeniy Polyakov
2008-12-07 17:52                                                   ` Alan Cox
2008-12-07 17:54                                                     ` Evgeniy Polyakov
2008-12-07 18:03                                                       ` Alan Cox
2008-12-07 18:13                                                         ` Kay Sievers
2008-12-07 18:15                                                           ` Alan Cox
2008-12-07 18:21                                                             ` Kay Sievers
2008-12-07 18:31                                                               ` Alan Cox
2008-12-07 19:02                                                                 ` Kay Sievers
2008-12-07 20:00                                                                   ` Alan Cox
2008-12-07 22:26                                                                     ` Kay Sievers
2008-12-08  1:18                                                                       ` Theodore Tso
2008-12-08  3:35                                                                         ` Kay Sievers
2008-12-09  1:09                                                                           ` Theodore Tso
2008-12-09  2:00                                                                             ` Kay Sievers
2008-12-09 10:13                                                                             ` Alan Cox
2008-12-07 16:33                                     ` Evgeniy Polyakov
2008-12-08 13:06                                     ` Evgeniy Polyakov
2008-12-09  0:42                                       ` Herbert Xu
2008-12-08 13:22                           ` Evgeniy Polyakov
2008-12-06  0:29           ` Alan Cox

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=1228591926.3808.6.camel@nga \
    --to=kay.sievers@vrfy.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zbr@ioremap.net \
    /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