From: Ralf Baechle Serial8250_console_write() is fiddling with the UART's IER register without taking the lock. So things go really wrong if an interrupt ends up fiddling with IER as well. Signed-off-by: Ralf Baechle Cc: Russell King Signed-off-by: Andrew Morton --- drivers/serial/8250.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN drivers/serial/8250.c~8250-serial-console-locking-bug-spelling-fix drivers/serial/8250.c --- devel/drivers/serial/8250.c~8250-serial-console-locking-bug-spelling-fix 2005-08-17 21:25:30.000000000 -0700 +++ devel-akpm/drivers/serial/8250.c 2005-08-17 21:25:30.000000000 -0700 @@ -2137,8 +2137,10 @@ serial8250_console_write(struct console unsigned int ier; int i; + spin_lock_irq(&up->port.lock); + /* - * First save the UER then disable the interrupts + * First save the IER then disable the interrupts */ ier = serial_in(up, UART_IER); @@ -2170,6 +2172,7 @@ serial8250_console_write(struct console */ wait_for_xmitr(up); serial_out(up, UART_IER, ier); + spin_unlock_irq(&up->port.lock); } static int serial8250_console_setup(struct console *co, char *options) _