summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0203-serial-Take-care-starting-a-hung-up-tty-s-port.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-04-07 21:25:10 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-04-07 21:25:10 +0200
commita8d4d71c41ff0158c2026cac5981e39702167da9 (patch)
tree0c54ec3eb59f5bab6aa7318d14c92ff875412202 /target/linux/brcm2708/patches-4.4/0203-serial-Take-care-starting-a-hung-up-tty-s-port.patch
parent59e0e88c22007fd77ee9c6c8e02a689889a5f597 (diff)
downloadmaster-31e0f0ae-a8d4d71c41ff0158c2026cac5981e39702167da9.tar.gz
master-31e0f0ae-a8d4d71c41ff0158c2026cac5981e39702167da9.tar.bz2
master-31e0f0ae-a8d4d71c41ff0158c2026cac5981e39702167da9.zip
brcm2708: update to latest version
As usual these patches were extracted from the raspberry pi repo: https://github.com/raspberrypi/linux/commits/rpi-4.4.y Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0203-serial-Take-care-starting-a-hung-up-tty-s-port.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0203-serial-Take-care-starting-a-hung-up-tty-s-port.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0203-serial-Take-care-starting-a-hung-up-tty-s-port.patch b/target/linux/brcm2708/patches-4.4/0203-serial-Take-care-starting-a-hung-up-tty-s-port.patch
new file mode 100644
index 0000000000..5ab6d2e509
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0203-serial-Take-care-starting-a-hung-up-tty-s-port.patch
@@ -0,0 +1,28 @@
+From c9276ae7cfecbd1df477ff31116682e72dd6d8f7 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Wed, 9 Mar 2016 13:28:24 +0000
+Subject: [PATCH 203/232] serial: Take care starting a hung-up tty's port
+
+tty_port_hangup sets a port's tty field to NULL (holding the port lock),
+but uart_tx_stopped, called from __uart_start (with the port lock),
+uses the tty field without checking for NULL.
+
+Change uart_tx_stopped to treat a NULL tty field as another stopped
+indication.
+
+Signed-off-by: Phil Elwell <phil@raspberrypi.org>
+---
+ include/linux/serial_core.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/serial_core.h
++++ b/include/linux/serial_core.h
+@@ -397,7 +397,7 @@ int uart_resume_port(struct uart_driver
+ static inline int uart_tx_stopped(struct uart_port *port)
+ {
+ struct tty_struct *tty = port->state->port.tty;
+- if (tty->stopped || port->hw_stopped)
++ if (!tty || tty->stopped || port->hw_stopped)
+ return 1;
+ return 0;
+ }