aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0202-serial-Take-care-starting-a-hung-up-tty-s-port.patch
diff options
context:
space:
mode:
authorLuka Perkov <luka.perkov@sartura.hr>2016-06-23 13:57:21 +0200
committerGitHub <noreply@github.com>2016-06-23 13:57:21 +0200
commit282b917e47d9ae5017e1e426face9b75cb7aabd0 (patch)
tree3284ca2d20d9c8d7a4563c6446675c1ecf3feac2 /target/linux/brcm2708/patches-4.4/0202-serial-Take-care-starting-a-hung-up-tty-s-port.patch
parent34d432b05312de6d9575c559db8209809489096d (diff)
parent441a9c879ba6562ea9f431cf33bbb0c0400d5fd0 (diff)
downloadmaster-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.gz
master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.bz2
master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.zip
Merge pull request #11 from wigyori/master
pull req for 4.4.12, ar71xx/mediatek updates, package upgrades
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0202-serial-Take-care-starting-a-hung-up-tty-s-port.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0202-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/0202-serial-Take-care-starting-a-hung-up-tty-s-port.patch b/target/linux/brcm2708/patches-4.4/0202-serial-Take-care-starting-a-hung-up-tty-s-port.patch
new file mode 100644
index 0000000000..78a148bc76
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0202-serial-Take-care-starting-a-hung-up-tty-s-port.patch
@@ -0,0 +1,28 @@
+From 35370cf396896477ee7e8cb044779a3ee9257a7e Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Wed, 9 Mar 2016 13:28:24 +0000
+Subject: [PATCH 202/381] 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;
+ }