From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] serial: 8250: clear RX trigger callbacks when removing a port
Date: Fri, 04 Dec 2026 10:04:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-249567@kernel.org> (raw)
In-Reply-To: <20261204-submit-serial-8250-rxtrig-lifetime-v1-v2-1-86264f63cefa@gmail.com>
> serial8250_unregister_port() removes the device supplied by a driver and
> normally re-registers the persistent slot as an unknown legacy port. The
> slot retains its RX trigger callbacks and sysfs attribute group, so the
> replacement rx_trig_bytes attribute can still call the removed driver's
> code. Reading or writing this attribute does not require opening the
> port. Unloading the driver therefore leaves sysfs able to call into freed
> module text.
>
> Clear both callbacks after uart_remove_one_port() has drained the old
> sysfs users and before registering the fallback port. Its RX trigger
> attribute then uses the generic handlers, which reject a port without
> FIFO capabilities.
>
> Also copy the callbacks unconditionally during registration. A replacement
> port without custom handlers must use the generic implementation instead
> of inheriting callbacks from the previous owner of the slot.
>
> Fixes: 8a6c543cf8b3 ("serial: 8250: allow UART drivers to override rx_trig_bytes handling")
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-submit-serial-8250-rxtrig-lifetime-v1-v2-1-86264f63cefa@gmail.com?part=1
prev parent reply other threads:[~2026-12-04 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 9:49 [PATCH v2] serial: 8250: clear RX trigger callbacks when removing a port James Hilliard
2026-12-04 10:04 ` 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-249567@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=linux-serial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox