Commit b320441c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial fixes from Greg KH:
 "Here are some small tty and serial core fixes for 6.5-rc7 that resolve
  a lot of reported issues.

  Primarily in here are the fixes for the serial bus code from Tony that
  came in -rc1, as it hit wider testing with the huge number of
  different types of systems and serial ports. All of the reported
  issues with duplicate names and other issues with this code are now
  resolved.

  Other than that included in here is:

   - n_gsm fix for a previous fix

   - 8250 lockdep annotation fix

   - fsl_lpuart serial driver fix

   - TIOCSTI documentation update for previous CAP_SYS_ADMIN change

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'tty-6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: core: Fix serial core port id, including multiport devices
  serial: 8250: drop lockdep annotation from serial8250_clear_IER()
  tty: n_gsm: fix the UAF caused by race condition in gsm_cleanup_mux
  serial: core: Revert port_id use
  TIOCSTI: Document CAP_SYS_ADMIN behaviour in Kconfig
  serial: 8250: Fix oops for port->pm on uart_change_pm()
  serial: 8250: Reinit port_id when adding back serial8250_isa_devs
  serial: core: Fix kmemleak issue for serial core device remove
  MAINTAINERS: Merge TTY layer and serial drivers
  serial: core: Fix serial_base_match() after fixing controller port name
  serial: core: Fix serial core controller port name to show controller id
  serial: core: Fix serial core port id to not use port->line
  serial: core: Controller id cannot be negative
  tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuart32 platforms
parents ec27a636 04c7f60c
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -19224,13 +19224,6 @@ F: Documentation/devicetree/bindings/serial/serial.yaml
F:	drivers/tty/serdev/
F:	include/linux/serdev.h
SERIAL DRIVERS
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
L:	linux-serial@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/serial/
F:	drivers/tty/serial/
SERIAL IR RECEIVER
M:	Sean Young <sean@mess.org>
L:	linux-media@vger.kernel.org
@@ -21635,20 +21628,16 @@ W: https://github.com/srcres258/linux-doc
T:	git git://github.com/srcres258/linux-doc.git doc-zh-tw
F:	Documentation/translations/zh_TW/
TTY LAYER
TTY LAYER AND SERIAL DRIVERS
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M:	Jiri Slaby <jirislaby@kernel.org>
L:	linux-kernel@vger.kernel.org
L:	linux-serial@vger.kernel.org
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
F:	Documentation/devicetree/bindings/serial/
F:	Documentation/driver-api/serial/
F:	drivers/tty/
F:	drivers/tty/serial/serial_base.h
F:	drivers/tty/serial/serial_base_bus.c
F:	drivers/tty/serial/serial_core.c
F:	drivers/tty/serial/serial_ctrl.c
F:	drivers/tty/serial/serial_port.c
F:	include/linux/selection.h
F:	include/linux/serial.h
F:	include/linux/serial_core.h
+3 −0
Original line number Diff line number Diff line
@@ -164,6 +164,9 @@ config LEGACY_TIOCSTI
	  userspace depends on this functionality to continue operating
	  normally.

	  Processes which run with CAP_SYS_ADMIN, such as BRLTTY, can
	  use TIOCSTI even when this is set to N.

	  This functionality can be changed at runtime with the
	  dev.tty.legacy_tiocsti sysctl. This configuration option sets
	  the default value of the sysctl.
+2 −1
Original line number Diff line number Diff line
@@ -3042,12 +3042,13 @@ static void gsm_error(struct gsm_mux *gsm)
static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc)
{
	int i;
	struct gsm_dlci *dlci = gsm->dlci[0];
	struct gsm_dlci *dlci;
	struct gsm_msg *txq, *ntxq;

	gsm->dead = true;
	mutex_lock(&gsm->mutex);

	dlci = gsm->dlci[0];
	if (dlci) {
		if (disc && dlci->state != DLCI_CLOSED) {
			gsm_dlci_begin_close(dlci);
+3 −0
Original line number Diff line number Diff line
@@ -497,6 +497,7 @@ static struct uart_8250_port *serial8250_setup_port(int index)

	up = &serial8250_ports[index];
	up->port.line = index;
	up->port.port_id = index;

	serial8250_init_port(up);
	if (!base_ops)
@@ -1040,6 +1041,7 @@ int serial8250_register_8250_port(const struct uart_8250_port *up)
			uart_remove_one_port(&serial8250_reg, &uart->port);

		uart->port.ctrl_id	= up->port.ctrl_id;
		uart->port.port_id	= up->port.port_id;
		uart->port.iobase       = up->port.iobase;
		uart->port.membase      = up->port.membase;
		uart->port.irq          = up->port.irq;
@@ -1202,6 +1204,7 @@ void serial8250_unregister_port(int line)
		uart->port.flags &= ~UPF_BOOT_AUTOCONF;
		uart->port.type = PORT_UNKNOWN;
		uart->port.dev = &serial8250_isa_devs->dev;
		uart->port.port_id = line;
		uart->capabilities = 0;
		serial8250_init_port(uart);
		serial8250_apply_quirks(uart);
+1 −3
Original line number Diff line number Diff line
@@ -703,9 +703,6 @@ static void serial8250_set_sleep(struct uart_8250_port *p, int sleep)

static void serial8250_clear_IER(struct uart_8250_port *up)
{
	/* Port locked to synchronize UART_IER access against the console. */
	lockdep_assert_held_once(&up->port.lock);

	if (up->capabilities & UART_CAP_UUE)
		serial_out(up, UART_IER, UART_IER_UUE);
	else
@@ -3278,6 +3275,7 @@ void serial8250_init_port(struct uart_8250_port *up)

	spin_lock_init(&port->lock);
	port->ctrl_id = 0;
	port->pm = NULL;
	port->ops = &serial8250_pops;
	port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE);

Loading