]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Aug 2023 11:50:12 +0000 (13:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Aug 2023 11:50:12 +0000 (13:50 +0200)
added patches:
serial-8250-fix-oops-for-port-pm-on-uart_change_pm.patch

queue-4.14/serial-8250-fix-oops-for-port-pm-on-uart_change_pm.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/serial-8250-fix-oops-for-port-pm-on-uart_change_pm.patch b/queue-4.14/serial-8250-fix-oops-for-port-pm-on-uart_change_pm.patch
new file mode 100644 (file)
index 0000000..58c9177
--- /dev/null
@@ -0,0 +1,38 @@
+From dfe2aeb226fd5e19b0ee795f4f6ed8bc494c1534 Mon Sep 17 00:00:00 2001
+From: Tony Lindgren <tony@atomide.com>
+Date: Fri, 4 Aug 2023 16:15:51 +0300
+Subject: serial: 8250: Fix oops for port->pm on uart_change_pm()
+
+From: Tony Lindgren <tony@atomide.com>
+
+commit dfe2aeb226fd5e19b0ee795f4f6ed8bc494c1534 upstream.
+
+Unloading a hardware specific 8250 driver can produce error "Unable to
+handle kernel paging request at virtual address" about ten seconds after
+unloading the driver. This happens on uart_hangup() calling
+uart_change_pm().
+
+Turns out commit 04e82793f068 ("serial: 8250: Reinit port->pm on port
+specific driver unbind") was only a partial fix. If the hardware specific
+driver has initialized port->pm function, we need to clear port->pm too.
+Just reinitializing port->ops does not do this. Otherwise serial8250_pm()
+will call port->pm() instead of serial8250_do_pm().
+
+Fixes: 04e82793f068 ("serial: 8250: Reinit port->pm on port specific driver unbind")
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Link: https://lore.kernel.org/r/20230804131553.52927-1-tony@atomide.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_port.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/tty/serial/8250/8250_port.c
++++ b/drivers/tty/serial/8250/8250_port.c
+@@ -3191,6 +3191,7 @@ void serial8250_init_port(struct uart_82
+       struct uart_port *port = &up->port;
+       spin_lock_init(&port->lock);
++      port->pm = NULL;
+       port->ops = &serial8250_pops;
+       up->cur_iotype = 0xFF;
index 4814374cf29c6abe6b932ec4218d4b8aa4ba7958..4e2783daf4991854d46b1cf500b5b94e6bcb2ac7 100644 (file)
@@ -29,3 +29,4 @@ net-do-not-allow-gso_size-to-be-set-to-gso_by_frags.patch
 alsa-usb-audio-add-support-for-mythware-xa001au-capture-and-playback-interfaces.patch
 cifs-release-folio-lock-on-fscache-read-hit.patch
 mmc-wbsd-fix-double-mmc_free_host-in-wbsd_init.patch
+serial-8250-fix-oops-for-port-pm-on-uart_change_pm.patch