提交 2f41c488 编写于 作者: J Jiri Slaby 提交者: Yongqiang Liu

tty: the rest, stop using tty_schedule_flip()

stable inclusion
from stable-v4.19.254
commit a87be523310f1ef557cdf18dab2cbc93cb5e10f3
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I5A5Y1
CVE: CVE-2022-1462

--------------------------------

commit b68b9144 upstream.

Since commit a9c3f68f (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the latter (as it is used less), so call the former in
the rest of the users.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@reisers.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211122111648.30379-3-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYi Yang <yiyang13@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: NWang Weiyang <wangweiyang2@huawei.com>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 d3496787
...@@ -59,7 +59,7 @@ srmcons_do_receive_chars(struct tty_port *port) ...@@ -59,7 +59,7 @@ srmcons_do_receive_chars(struct tty_port *port)
} while((result.bits.status & 1) && (++loops < 10)); } while((result.bits.status & 1) && (++loops < 10));
if (count) if (count)
tty_schedule_flip(port); tty_flip_buffer_push(port);
return count; return count;
} }
......
...@@ -56,7 +56,7 @@ static inline void ...@@ -56,7 +56,7 @@ static inline void
kbd_put_queue(struct tty_port *port, int ch) kbd_put_queue(struct tty_port *port, int ch)
{ {
tty_insert_flip_char(port, ch, 0); tty_insert_flip_char(port, ch, 0);
tty_schedule_flip(port); tty_flip_buffer_push(port);
} }
static inline void static inline void
...@@ -64,5 +64,5 @@ kbd_puts_queue(struct tty_port *port, char *cp) ...@@ -64,5 +64,5 @@ kbd_puts_queue(struct tty_port *port, char *cp)
{ {
while (*cp) while (*cp)
tty_insert_flip_char(port, *cp++, 0); tty_insert_flip_char(port, *cp++, 0);
tty_schedule_flip(port); tty_flip_buffer_push(port);
} }
...@@ -89,7 +89,7 @@ static int spk_ttyio_receive_buf2(struct tty_struct *tty, ...@@ -89,7 +89,7 @@ static int spk_ttyio_receive_buf2(struct tty_struct *tty,
} }
if (!ldisc_data->buf_free) if (!ldisc_data->buf_free)
/* ttyio_in will tty_schedule_flip */ /* ttyio_in will tty_flip_buffer_push */
return 0; return 0;
/* Make sure the consumer has read buf before we have seen /* Make sure the consumer has read buf before we have seen
...@@ -322,7 +322,7 @@ static unsigned char ttyio_in(int timeout) ...@@ -322,7 +322,7 @@ static unsigned char ttyio_in(int timeout)
mb(); mb();
ldisc_data->buf_free = true; ldisc_data->buf_free = true;
/* Let TTY push more characters */ /* Let TTY push more characters */
tty_schedule_flip(speakup_tty->port); tty_flip_buffer_push(speakup_tty->port);
return rv; return rv;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册