Skip to content

Commit

Permalink
8250: Fix lock warning (and possible crash)
Browse files Browse the repository at this point in the history
Splitting the 8250 code back up to avoid a clash with the NR_IRQS removal
patch introduced a last minute bug. Put back the additional needed lines
for the old lock init

Signed-off-by: Alan Cox <alan@redhat.com>
[ Ingo also reports that this can cause a spontaneous reboot crash with
  certain configs, and sends in an identical patch ]
Tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Oct 14, 2008
1 parent 7591103 commit 4aba41e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -2969,6 +2969,9 @@ static int __init serial8250_init(void)
"%d ports, IRQ sharing %sabled\n", nr_uarts,
share_irqs ? "en" : "dis");

for (i = 0; i < NR_IRQS; i++)
spin_lock_init(&irq_lists[i].lock);

#ifdef CONFIG_SPARC
ret = sunserial_register_minors(&serial8250_reg, UART_NR);
#else
Expand Down

0 comments on commit 4aba41e

Please sign in to comment.