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 2/3] serial: 8250_omap: set priv->line before enabling the IRQ
Date: Sat, 10 Oct 2026 05:46:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-166268@kernel.org> (raw)
In-Reply-To: <d25b0dc9f84e7cd9b42324a19cbe4b4f78164172.1791524724.git.jirislaby@kernel.org>

> omap8250_irq() is requested in omap8250_probe() with IRQ_NOAUTOEN and
> enabled only in omap_8250_startup(). The handler obtains the port by
> serial8250_get_port(priv->line), but probe stores priv->line only after
> serial8250_register_8250_port() returns.
> 
> The port becomes visible to userspace already inside
> serial8250_register_8250_port() (uart_add_one_port()). So it can be
> opened -- and the IRQ enabled -- before probe stores the line. An
> interrupt in that window makes the handler call
> serial8250_get_port(-ENODEV) and dereference a pointer outside of
> serial8250_ports[].
> 
> Store the line in omap_8250_startup() before enable_irq(), so the
> handler never runs with an unset line. Keep the assignment in probe
> too, as remove and the system PM callbacks rely on it even when the
> port was never opened.
> 
> Fixes: fef4f600319e ("serial: 8250: omap: Fix life cycle issues for interrupt handlers")
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/ef47d676a44346e058f29a00c8701484db722831.1791524724.git.jirislaby@kernel.org?part=2


  reply	other threads:[~2026-10-10  5:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1791524724.git.jirislaby@kernel.org>
2026-10-09  5:46 ` [PATCH 1/3] serial: 8250_lpss: do not touch uninitialized line in ehl_serial_exit() Jiri Slaby (SUSE)
2026-10-09 11:11   ` Ilpo Järvinen
2026-10-10  5:46   ` sashiko-bot
2026-10-11  9:29     ` Jiri Slaby
2026-10-09  5:46 ` [PATCH 2/3] serial: 8250_omap: set priv->line before enabling the IRQ Jiri Slaby (SUSE)
2026-10-10  5:46   ` sashiko-bot [this message]
2026-10-09  5:46 ` [PATCH 3/3] serial: 8250: make port operations work on struct uart_8250_port Jiri Slaby (SUSE)
2026-10-09 11:25   ` Ilpo Järvinen
2026-10-10  5:46   ` sashiko-bot

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-166268@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.