diff options
| author | Ji-Ze Hong (Peter Hong) <[email protected]> | 2017-11-08 03:05:46 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-11-08 12:09:35 +0000 |
| commit | 07a708f0a16f040b319db647452bcb8884cd04be (patch) | |
| tree | 2c677e48e42007574c7210fc28e2f8c37d97a54d /drivers/tty/serial/sccnxp.c | |
| parent | serial: 8250_fintek: Disable delays for ports != 0 (diff) | |
| download | kernel-07a708f0a16f040b319db647452bcb8884cd04be.tar.gz kernel-07a708f0a16f040b319db647452bcb8884cd04be.zip | |
serial: 8250_fintek: Fix crash with baud rate B0
The 8250_fintek.c is support the Fintek F81866/F81216 with dynamic clock.
But It'll generate "division by zero" exception and crash in
fintek_8250_set_termios() with baud rate 0 on baudrate_table[i] % baud.
It can be tested with following C code:
...
struct termios options;
tcgetattr(fd, &options);
...
options.c_cflag = CS8 | CREAD; /* baud rate 0 */
tcsetattr(fd, TCSANOW, &options);
tcflush(fd, TCIOFLUSH);
Fixes: 195638b6d44f ("serial: 8250_fintek: UART dynamic clocksource on Fintek F81866")
Reported-by: Lukas Redlinger <[email protected]>
Cc: Lukas Redlinger <[email protected]>
Signed-off-by: Ji-Ze Hong (Peter Hong) <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
0 files changed, 0 insertions, 0 deletions
