CVSROOT: /home/cvs
Module name: linux
Changes by: ralf@ftp.linux-mips.org 05/08/16 17:04:14
Modified files:
drivers/serial : 8250.c
Log message:
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.
diff -urN linux/drivers/serial/8250.c linux/drivers/serial/8250.c
--- linux/drivers/serial/8250.c 2005/07/12 09:19:16 1.39
+++ linux/drivers/serial/8250.c 2005/08/16 16:04:14 1.40
@@ -2137,8 +2137,10 @@
unsigned int ier;
int i;
+ spin_lock(&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,8 @@
*/
wait_for_xmitr(up);
serial_out(up, UART_IER, ier);
+
+ spin_unlock(&up->port.lock);
}
static int serial8250_console_setup(struct console *co, char *options)
|