From: Dhruva Gole <d-gole@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"John Ogness" <john.ogness@linutronix.de>,
"Johan Hovold" <johan@kernel.org>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: 8250: Fix oops for port->pm on uart_change_pm()
Date: Sat, 5 Aug 2023 10:34:27 +0530 [thread overview]
Message-ID: <20230805050427.tj4ya7w3a3nzc2dp@dhruva> (raw)
In-Reply-To: <20230804131553.52927-1-tony@atomide.com>
On Aug 04, 2023 at 16:15:51 +0300, Tony Lindgren wrote:
> 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().
Thanks for catching and fixing this!
>
> Fixes: 04e82793f068 ("serial: 8250: Reinit port->pm on port specific driver unbind")
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> drivers/tty/serial/8250/8250_port.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -3278,6 +3278,7 @@ void serial8250_init_port(struct uart_8250_port *up)
>
> spin_lock_init(&port->lock);
> port->ctrl_id = 0;
> + port->pm = NULL;
Reviewed-by: Dhruva Gole <d-gole@ti.com>
> port->ops = &serial8250_pops;
> port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE);
>
> --
> 2.41.0
--
Best regards,
Dhruva Gole <d-gole@ti.com>
prev parent reply other threads:[~2023-08-05 5:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 13:15 Tony Lindgren
2023-08-04 19:44 ` Andy Shevchenko
2023-08-05 5:04 ` Dhruva Gole [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230805050427.tj4ya7w3a3nzc2dp@dhruva \
--to=d-gole@ti.com \
--cc=andriy.shevchenko@intel.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=tony@atomide.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®