From: sashiko-bot@kernel.org
To: "Johan Hovold" <johan@kernel.org>
Cc: linux-serial@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] tty: reset ldisc to N_TTY on reopen after hangup
Date: Fri, 20 Nov 2026 11:33:50 +0000 [thread overview]
Message-ID: <sashiko-outbox-225055@kernel.org> (raw)
In-Reply-To: <20261120112455.1353962-1-johan@kernel.org>
> Line disciplines should not call into a TTY driver for a device that has
> been hung up as the underlying hardware may have been powered down or
> resources may have been freed.
>
> Since commit 638b9648ab51 ("tty: Fix the ldisc hangup race") the line
> discipline is however reinitialised on hangup which means that ldiscs
> that register class devices on initialisation (e.g. N_SLIP) can call
> back into a TTY driver after hangup.
>
> Commit 892d1fa7eaae ("tty: Destroy ldisc instance on hangup") later
> moved reinitialisation to open() but that still leaves a small window
> where an ldisc could call into the TTY driver before the device has been
> opened.
>
> For hotpluggable devices, open() can also race with disconnect,
> [ ... ]
> Fixes: 638b9648ab51 ("tty: Fix the ldisc hangup race")
> Reported-by: William A. Kennington III <william@wkennington.com>
> Link: https://lore.kernel.org/20261118145636.3534234-1-william@wkennington.com
> Cc: stable@vger.kernel.org
> Signed-off-by: Johan Hovold <johan@kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120112455.1353962-1-johan@kernel.org?part=1
prev parent reply other threads:[~2026-11-20 11:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 11:24 [PATCH] tty: reset ldisc to N_TTY on reopen after hangup Johan Hovold
2026-11-20 11:33 ` sashiko-bot [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=sashiko-outbox-225055@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=johan@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.