Fix the possible NULL pointer access in check_modem_status() in 8250.c. The check_modem_status() would access 'info' member of uart_port structure, but it is not initialized before uart_open() is called. The check_modem_status() can be called through /proc/tty/driver/serial before uart_open() is called. Signed-off-by: Kenji Kaneshige Signed-off-by: Taku Izumi --- drivers/serial/8250.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6.21-rc5/drivers/serial/8250.c =================================================================== --- linux-2.6.21-rc5.orig/drivers/serial/8250.c 2007-03-26 09:14:37.000000000 +0900 +++ linux-2.6.21-rc5/drivers/serial/8250.c 2007-04-13 12:06:52.000000000 +0900 @@ -1310,7 +1310,8 @@ { unsigned int status = serial_in(up, UART_MSR); - if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI) { + if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI && + up->port.info != NULL) { if (status & UART_MSR_TERI) up->port.icount.rng++; if (status & UART_MSR_DDSR)