linux-stable/drivers/tty/hvc
Jiri Slaby 0524513afe tty: don't store semi-state into tty drivers
When a tty driver pointer is used as a return value of struct
console's device() hook, don't store a semi-state into global variable
which holds the tty driver. It could mean console::device() would return
a bogus value. This is important esp. after the next patch where we
switch from alloc_tty_driver to tty_alloc_driver. tty_alloc_driver
returns ERR_PTR in case of error and that might have unexpected results
as the code doesn't expect this.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: Felipe Balbi <balbi@kernel.org>
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Helge Deller <deller@gmx.de>	# parisc
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210723074317.32690-4-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27 12:17:20 +02:00
..
hvc_console.c tty: hvc_console: Remove the repeated words 'no' and 'from' 2021-05-21 20:36:15 +02:00
hvc_console.h tty: hvc: Use the correct style for SPDX License Identifier 2020-03-18 13:01:05 +01:00
hvc_dcc.c hvc: dcc: Add earlycon support 2019-10-11 08:38:07 +02:00
hvc_irq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hvc_iucv.c TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
hvc_opal.c tty: hvc: hvc_opal: Staticify function invoked by reference 2020-11-06 10:54:05 +01:00
hvc_riscv_sbi.c tty: Don't force RISCV SBI console as preferred console 2019-05-16 20:42:11 -07:00
hvc_rtas.c tty: hvc: Remove redundant license text 2017-11-08 13:08:12 +01:00
hvc_udbg.c tty: hvc: make symbol 'hvc_udbg_dev' static 2021-04-10 10:41:40 +02:00
hvc_vio.c tty: hvc: udbg_hvc: retry putc on -EAGAIN 2021-05-23 20:51:36 +10:00
hvc_xen.c tty: hvc: replace BUG_ON() with negative return value 2021-07-21 15:57:28 +02:00
hvcs.c tty: make tty_operations::chars_in_buffer return uint 2021-05-13 18:29:11 +02:00
hvsi.c tty: don't store semi-state into tty drivers 2021-07-27 12:17:20 +02:00
hvsi_lib.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n 2020-09-27 14:17:43 +02:00
Makefile TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00