All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: rp2: remove ports on IRQ request failure in probe
Date: Wed, 25 Nov 2026 08:43:50 +0000	[thread overview]
Message-ID: <sashiko-outbox-232932@kernel.org> (raw)
In-Reply-To: <20261125084059.84951-1-jirislaby@kernel.org>

> Since commit 016002848c82 ("serial: rp2: use 'request_firmware' instead
> of 'request_firmware_nowait'"), rp2_probe() loads the firmware and
> registers all the UART ports (via rp2_load_firmware()) before requesting
> the IRQ. But if devm_request_irq() fails, probe just returns the error
> and leaves the ports registered with the serial core.
> 
> rp2_remove() is not called for a failed probe, so the ports stay
> registered, pointing to a card whose devm-managed memory (card->ports
> included) and iomaps are freed. Any later access to the tty devices
> then results in a use-after-free.
> 
> Call rp2_remove_ports() when the IRQ request fails.
> 
> Fixes: 016002848c82 ("serial: rp2: use 'request_firmware' instead of 'request_firmware_nowait'")
> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125084059.84951-1-jirislaby@kernel.org?part=1

      reply	other threads:[~2026-11-25  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  8:40 [PATCH] serial: rp2: remove ports on IRQ request failure in probe Jiri Slaby (SUSE)
2026-11-25  8:43 ` 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-232932@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=jirislaby@kernel.org \
    --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 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.