From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Phil Rosenthal <phil@phil.gs>
Cc: Jiri Slaby <jirislaby@kernel.org>, Rob Herring <robh@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Johan Hovold <johan@kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH v2] serial: core: Shut down a running console port before removing it
Date: Wed, 14 Oct 2026 17:40:49 +0200 [thread overview]
Message-ID: <2026101433-refuse-unbiased-4b63@gregkh> (raw)
In-Reply-To: <61E0B380-1646-4770-BF37-E1E4329FEE86@phil.gs>
On Tue, Oct 13, 2026 at 04:42:47PM +0000, Phil Rosenthal wrote:
> On Tue, Oct 13, 2026 at 06:12:52PM +0200, Greg Kroah-Hartman wrote:
> > Is this the same as:
> > https://patch.msgid.link/20261003163337.45577-1-igorpetindev@gmail.com
> > ?
>
> Yes, it's the same bug and the same fix. I hadn't seen Igor's patch when I
> sent mine, sorry for the noise. His is in tty-testing already, so
> please drop mine.
>
> > Why does that commit set a field and this change does not? Which is
> > correct?
>
> Both work. Clearing port->console isn't needed for the fix, and it does
> no harm. uart_shutdown() doesn't look at that flag. It is only read in
> tty_port_shutdown_locked() and tty_port_close(), on the last close of a
> tty, and by this point any open tty has been hung up, so
> tty_port_close_start() returns before either is reached.
> serial_core_add_one_port() sets the flag again when the line is reused.
>
> The other difference is that Igor's patch calls uart_shutdown() only if
> tty_port_initialized(), as my v1 did. Sashiko's review of my v1 pointed
> out that a console port removed while suspended is not initialized but
> still has its suspended flag set and its transmit buffer allocated, and
> uart_shutdown() would clear both. That needs the device to go away
> between system suspend and resume, and I haven't found a way to test
> it. If you want it covered I can send a patch on top of Igor's commit
> that drops the tty_port_initialized() check.
That would be nice, thank you.
greg k-h
prev parent reply other threads:[~2026-10-14 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 14:07 [PATCH v2] serial: core: Shut down a running console port before removing it Phil Rosenthal via B4 Relay
2026-10-13 14:07 ` Phil Rosenthal
2026-10-13 14:16 ` sashiko-bot
2026-10-13 16:12 ` Greg Kroah-Hartman
2026-10-13 16:42 ` Phil Rosenthal
2026-10-14 15:40 ` Greg Kroah-Hartman [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=2026101433-refuse-unbiased-4b63@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=geert+renesas@glider.be \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=phil@phil.gs \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.