Skip to content

Commit

Permalink
[SPARC64]: Fix oops on runlevel change with serial console.
Browse files Browse the repository at this point in the history
Incorrect uart_write_wakeup() calls cause reference to a
NULL tty pointer in sunsab and sunzilog serial drivers.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 11, 2005
1 parent 907a426 commit b8df110
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion drivers/serial/sunsab.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ static void transmit_chars(struct uart_sunsab_port *up,
if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
up->interrupt_mask1 |= SAB82532_IMR1_XPR;
writeb(up->interrupt_mask1, &up->regs->w.imr1);
uart_write_wakeup(&up->port);
return;
}

Expand Down
5 changes: 2 additions & 3 deletions drivers/serial/sunzilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,9 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up,
if (up->port.info == NULL)
goto ack_tx_int;
xmit = &up->port.info->xmit;
if (uart_circ_empty(xmit)) {
uart_write_wakeup(&up->port);
if (uart_circ_empty(xmit))
goto ack_tx_int;
}

if (uart_tx_stopped(&up->port))
goto ack_tx_int;

Expand Down

0 comments on commit b8df110

Please sign in to comment.