Patch "serial: 8250: Fix oops for port->pm on uart_change_pm()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    serial: 8250: Fix oops for port->pm on uart_change_pm()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     serial-8250-fix-oops-for-port-pm-on-uart_change_pm.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7b70618616cd83f14d91f7e4c28fa224c3ac97b3
Author: Tony Lindgren <tony@xxxxxxxxxxx>
Date:   Fri Aug 4 16:15:51 2023 +0300

    serial: 8250: Fix oops for port->pm on uart_change_pm()
    
    [ Upstream commit dfe2aeb226fd5e19b0ee795f4f6ed8bc494c1534 ]
    
    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@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230804131553.52927-1-tony@xxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 432a438929e64..7499954c9aa76 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -3231,6 +3231,7 @@ void serial8250_init_port(struct uart_8250_port *up)
 	struct uart_port *port = &up->port;
 
 	spin_lock_init(&port->lock);
+	port->pm = NULL;
 	port->ops = &serial8250_pops;
 	port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux