tty: serial - fix tty back references in termios
One or two drivers go poking back into the tty from the termios setting routine in unsafe ways. We don't need to pass the tty down because the [ab]users are just using it to get at things they can get at anyway. This leaves low_latency setting to sort out along with set_ldisc use. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
192251352f
commit
eab4f5af6b
@@ -1685,11 +1685,12 @@ ioc4_change_speed(struct uart_port *the_port,
|
||||
{
|
||||
struct ioc4_port *port = get_ioc4_port(the_port, 0);
|
||||
int baud, bits;
|
||||
unsigned cflag;
|
||||
unsigned cflag, iflag;
|
||||
int new_parity = 0, new_parity_enable = 0, new_stop = 0, new_data = 8;
|
||||
struct uart_state *state = the_port->state;
|
||||
|
||||
cflag = new_termios->c_cflag;
|
||||
iflag = new_termios->c_iflag;
|
||||
|
||||
switch (cflag & CSIZE) {
|
||||
case CS5:
|
||||
@@ -1741,12 +1742,12 @@ ioc4_change_speed(struct uart_port *the_port,
|
||||
|
||||
state->port.tty->low_latency = 1;
|
||||
|
||||
if (I_IGNPAR(state->port.tty))
|
||||
if (iflag & IGNPAR)
|
||||
the_port->ignore_status_mask &= ~(N_PARITY_ERROR
|
||||
| N_FRAMING_ERROR);
|
||||
if (I_IGNBRK(state->port.tty)) {
|
||||
if (iflag & IGNBRK) {
|
||||
the_port->ignore_status_mask &= ~N_BREAK;
|
||||
if (I_IGNPAR(state->port.tty))
|
||||
if (iflag & IGNPAR)
|
||||
the_port->ignore_status_mask &= ~N_OVERRUN_ERROR;
|
||||
}
|
||||
if (!(cflag & CREAD)) {
|
||||
|
Reference in New Issue
Block a user