Revision 4dda864d73079a1eb01fab4ec29b97db150163bf authored by Geert Uytterhoeven on 28 October 2016, 12:07:47 UTC, committed by Greg Kroah-Hartman on 28 October 2016, 12:13:07 UTC
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 <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
[robh: rebased on tty-linus]
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9bcffe7
History
File Mode Size
partitions
Kconfig -rw-r--r-- 3.8 KB
Kconfig.iosched -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 949 bytes
badblocks.c -rw-r--r-- 14.2 KB
bio-integrity.c -rw-r--r-- 14.2 KB
bio.c -rw-r--r-- 48.5 KB
blk-cgroup.c -rw-r--r-- 35.8 KB
blk-core.c -rw-r--r-- 93.3 KB
blk-exec.c -rw-r--r-- 3.2 KB
blk-flush.c -rw-r--r-- 15.4 KB
blk-integrity.c -rw-r--r-- 12.3 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-lib.c -rw-r--r-- 7.3 KB
blk-map.c -rw-r--r-- 5.8 KB
blk-merge.c -rw-r--r-- 19.6 KB
blk-mq-cpumap.c -rw-r--r-- 2.3 KB
blk-mq-pci.c -rw-r--r-- 1.5 KB
blk-mq-sysfs.c -rw-r--r-- 11.7 KB
blk-mq-tag.c -rw-r--r-- 11.1 KB
blk-mq-tag.h -rw-r--r-- 2.2 KB
blk-mq.c -rw-r--r-- 56.5 KB
blk-mq.h -rw-r--r-- 2.7 KB
blk-settings.c -rw-r--r-- 27.0 KB
blk-softirq.c -rw-r--r-- 4.3 KB
blk-sysfs.c -rw-r--r-- 18.5 KB
blk-tag.c -rw-r--r-- 10.0 KB
blk-throttle.c -rw-r--r-- 42.7 KB
blk-timeout.c -rw-r--r-- 5.9 KB
blk.h -rw-r--r-- 9.0 KB
bounce.c -rw-r--r-- 5.8 KB
bsg-lib.c -rw-r--r-- 6.0 KB
bsg.c -rw-r--r-- 22.9 KB
cfq-iosched.c -rw-r--r-- 127.1 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
compat_ioctl.c -rw-r--r-- 20.8 KB
deadline-iosched.c -rw-r--r-- 11.3 KB
elevator.c -rw-r--r-- 23.8 KB
genhd.c -rw-r--r-- 45.0 KB
ioctl.c -rw-r--r-- 14.8 KB
ioprio.c -rw-r--r-- 5.1 KB
noop-iosched.c -rw-r--r-- 2.6 KB
partition-generic.c -rw-r--r-- 14.7 KB
scsi_ioctl.c -rw-r--r-- 19.4 KB
t10-pi.c -rw-r--r-- 4.8 KB

back to top