diff options
| author | Geert Uytterhoeven <[email protected]> | 2016-10-28 12:07:47 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-10-28 12:13:07 +0000 |
| commit | 4dda864d73079a1eb01fab4ec29b97db150163bf (patch) | |
| tree | e44f9cc78700fc39ee8b7b453b06c1e524f54ed9 /scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | |
| parent | tty/serial: at91: fix hardware handshake on Atmel platforms (diff) | |
| download | kernel-4dda864d73079a1eb01fab4ec29b97db150163bf.tar.gz kernel-4dda864d73079a1eb01fab4ec29b97db150163bf.zip | |
tty: serial_core: Fix serial console crash on port shutdown
The port->console flag is always false, as uart_console() is called
before the serial console has been registered.
Hence for a serial port used as the console, uart_tty_port_shutdown()
will still be called when userspace closes the port, powering it down.
This may lead to a system lock up when the serial console driver writes
to the serial port's registers.
To fix this, move the setting of port->console after the call to
uart_configure_port(), which registers the serial console.
Fixes: 761ed4a94582ab29 ("tty: serial_core: convert uart_close to use tty_port_close")
Reported-by: Niklas Söderlund <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Rob Herring <[email protected]>
Tested-by: Mugunthan V N <[email protected]>
Tested-by: Niklas Söderlund <[email protected]>
[robh: rebased on tty-linus]
Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h')
0 files changed, 0 insertions, 0 deletions
