diff options
author | Anton Blanchard <anton@samba.org> | 2005-09-14 17:19:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-14 17:34:17 -0400 |
commit | ef4cbee0b0d0f791bb593f99b702410f3c0efce6 (patch) | |
tree | 9c7d2271f4af6985ffb6952fe43ddcf4d6d9b1d6 /drivers/char/hvc_console.c | |
parent | 8b7fc4214b550fafe595330e28d7c2c72b8b62f6 (diff) |
[PATCH] hvc_console: start kernel thread before registering tty
Its possible that we can write to the hvc_console tty as soon it is
registered. Recently this started happening due to (what looks like) a
change to the hotplug code.
Unfortunately at this stage we have not started the khvcd kernel thread and
oops. The solution is to start the kernel thread before registering the
tty.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r-- | drivers/char/hvc_console.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index cddb789902db..f92177634677 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -839,9 +839,6 @@ int __init hvc_init(void) | |||
839 | hvc_driver->flags = TTY_DRIVER_REAL_RAW; | 839 | hvc_driver->flags = TTY_DRIVER_REAL_RAW; |
840 | tty_set_operations(hvc_driver, &hvc_ops); | 840 | tty_set_operations(hvc_driver, &hvc_ops); |
841 | 841 | ||
842 | if (tty_register_driver(hvc_driver)) | ||
843 | panic("Couldn't register hvc console driver\n"); | ||
844 | |||
845 | /* Always start the kthread because there can be hotplug vty adapters | 842 | /* Always start the kthread because there can be hotplug vty adapters |
846 | * added later. */ | 843 | * added later. */ |
847 | hvc_task = kthread_run(khvcd, NULL, "khvcd"); | 844 | hvc_task = kthread_run(khvcd, NULL, "khvcd"); |
@@ -851,6 +848,9 @@ int __init hvc_init(void) | |||
851 | return -EIO; | 848 | return -EIO; |
852 | } | 849 | } |
853 | 850 | ||
851 | if (tty_register_driver(hvc_driver)) | ||
852 | panic("Couldn't register hvc console driver\n"); | ||
853 | |||
854 | return 0; | 854 | return 0; |
855 | } | 855 | } |
856 | module_init(hvc_init); | 856 | module_init(hvc_init); |