4
4
5
5
this is complete the fix in a5ba1d95e46ecaea638ddd7cd144107c783acb5d
6
6
---
7
- drivers/tty/serial/serial_core.c | 6 ++++--
8
- 1 file changed, 4 insertions(+), 2 deletions(-)
7
+ drivers/tty/serial/serial_core.c | 12 ++++++++-- --
8
+ 1 file changed, 8 insertions(+), 4 deletions(-)
9
9
10
10
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
11
- index 53e6db8..ec1187d 100644
11
+ index 53e6db8..c98a5d0 100644
12
12
--- a/drivers/tty/serial/serial_core.c
13
13
+++ b/drivers/tty/serial/serial_core.c
14
14
@@ -530,10 +530,12 @@ static int uart_put_char(struct tty_struct *tty, unsigned char c)
@@ -26,3 +26,18 @@ index 53e6db8..ec1187d 100644
26
26
if (port && uart_circ_chars_free(circ) != 0) {
27
27
circ->buf[circ->head] = c;
28
28
circ->head = (circ->head + 1) & (UART_XMIT_SIZE - 1);
29
+ @@ -567,10 +569,12 @@ static int uart_write(struct tty_struct *tty,
30
+ }
31
+
32
+ circ = &state->xmit;
33
+ - if (!circ->buf)
34
+ + port = uart_port_lock(state, flags);
35
+ + if (!circ->buf) {
36
+ + uart_port_unlock(port, flags);
37
+ return 0;
38
+ + }
39
+
40
+ - port = uart_port_lock(state, flags);
41
+ while (port) {
42
+ c = CIRC_SPACE_TO_END(circ->head, circ->tail, UART_XMIT_SIZE);
43
+ if (count < c)
0 commit comments