aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/esp.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-03-07 04:47:43 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-03-07 13:05:13 -0500
commit80d38f9a7871d9bafc3f244dabe48b41a58de705 (patch)
tree9925078f6862200ce9b2ba6e6a5fb84d411afc9e /drivers/char/esp.c
parentce4796d1e16cf3761dc2a02b8d588667d05b3078 (diff)
drivers/char/esp.c: fix bootup lockup
randconfig testing found a bootup lockup in drivers/char/esp.c because of a spinlock that wasn't correctly initialized. I'm not sure why it became more prominent in 2.6.25-rc4, the bug seems rather old and i've been doing allyesconfig bootups for ages with CONFIG_ESP enabled. This fixes this bootup lockup: PM: Adding info for No Bus:ttyP63 ttyP32 at 0x0240 (irq = 0) is an ESP primary port BUG: spinlock lockup on CPU#0, swapper/1, f56dd004 Pid: 1, comm: swapper Not tainted 2.6.25-rc4-sched-devel.git-x86-latest.git #402 [<c03ac6f4>] _raw_spin_lock+0x134/0x140 [<c08649be>] _spin_lock_irqsave+0x5e/0x80 [<c0b9fbfe>] ? espserial_init+0x2be/0x6e0 [<c0b9fbfe>] espserial_init+0x2be/0x6e0 [<c0b877a3>] kernel_init+0x83/0x260 [<c0b9f940>] ? espserial_init+0x0/0x6e0 [<c010416a>] ? restore_nocheck_notrace+0x0/0xe [<c0b87720>] ? kernel_init+0x0/0x260 [<c0b87720>] ? kernel_init+0x0/0x260 [<c0104507>] kernel_thread_helper+0x7/0x10 ======================= kzalloc() is not the way to initialize spinlocks anymore. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/esp.c')
-rw-r--r--drivers/char/esp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index c01e26d9ee5e..f3fe62067344 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -2484,6 +2484,7 @@ static int __init espserial_init(void)
2484 return 0; 2484 return 0;
2485 } 2485 }
2486 2486
2487 spin_lock_init(&info->lock);
2487 /* rx_trigger, tx_trigger are needed by autoconfig */ 2488 /* rx_trigger, tx_trigger are needed by autoconfig */
2488 info->config.rx_trigger = rx_trigger; 2489 info->config.rx_trigger = rx_trigger;
2489 info->config.tx_trigger = tx_trigger; 2490 info->config.tx_trigger = tx_trigger;