diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2007-05-21 06:09:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-21 12:50:22 -0400 |
commit | 6e537e9329d133526a576b741f85b3d48edc4ac1 (patch) | |
tree | 2320a9073b8e057d9f69ce1ffa89eadc8e708f8d /arch/blackfin/kernel/setup.c | |
parent | 8a0e6656030ffe9bcb81b725e956917bafc7522d (diff) |
Blackfin arch: Fix bug using usb keyboard crashes kernel
Without conswitchp preset, we have the following situation:
- During initcalls: con_init is called, and returns because of
!display_desc.
- At this point there is no memory allocated for vc_cons[].d
A bit later vty_init calls kbd_init.
- From now on events are passed to kbd_event which will then call
kbd_keycode.
- kbd_keycode will oops on a NULL pointer dereference on vc->vc_tty
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
[ Added commit description based on email thread. - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 342bb8dd56ac..c456ee5c1b4a 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
34 | #include <linux/cpu.h> | 34 | #include <linux/cpu.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/console.h> | ||
37 | #include <linux/tty.h> | 36 | #include <linux/tty.h> |
38 | 37 | ||
39 | #include <linux/ext2_fs.h> | 38 | #include <linux/ext2_fs.h> |
@@ -175,6 +174,9 @@ void __init setup_arch(char **cmdline_p) | |||
175 | unsigned long mtd_phys = 0; | 174 | unsigned long mtd_phys = 0; |
176 | #endif | 175 | #endif |
177 | 176 | ||
177 | #ifdef CONFIG_DUMMY_CONSOLE | ||
178 | conswitchp = &dummy_con; | ||
179 | #endif | ||
178 | cclk = get_cclk(); | 180 | cclk = get_cclk(); |
179 | sclk = get_sclk(); | 181 | sclk = get_sclk(); |
180 | 182 | ||