All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Grégoire Layet" <gregoire.layet@9elements.com>
Cc: mfd@lists.linux.dev, lee@kernel.org, robh@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 5/6] ARM: dts: aspeed: g6: Change vuart compatible string for ast2600
Date: Wed, 05 Aug 2026 12:27:31 +0000	[thread overview]
Message-ID: <20260805122731.DBF111F000E9@smtp.kernel.org> (raw)
In-Reply-To: <d54bfe689e6a0f318961588ab6b72fc2b09ebb47.1785932211.git.gregoire.layet@9elements.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Pre-existing probe error path fails to unregister 8250 port and timer, leading to a Use-After-Free.
--

--- Patch [5]: [PATCH v5 5/6] ARM: dts: aspeed: g6: Change vuart compatible string for ast2600 ---
commit 37accadaaa3a999dc66b41b5254b8c67bb2fec88
Author: Grégoire Layet <gregoire.layet@9elements.com>

ARM: dts: aspeed: g6: Change vuart compatible string for ast2600

Use the ast2600 compatible string to enable specific ast2600 properties,
while keeping the ast2500 compatible string as a fallback.

> diff --git a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
> index 56bb3b0444f7e..7c02633f2bd69 100644
> --- a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
> +++ b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
> @@ -707,7 +707,7 @@ emmc: sdhci@1e750100 {
>  			};
>  
>  			vuart1: serial@1e787000 {
> -				compatible = "aspeed,ast2500-vuart";
> +				compatible = "aspeed,ast2600-vuart", "aspeed,ast2500-vuart";

[Severity: High]
This is a pre-existing issue, but does enabling the ast2600-specific path 
expose a use-after-free during probe failure?

If the newly activated aspeed_ast2600_vuart_over_pci_set_enabled() fails in 
drivers/tty/serial/8250/8250_aspeed_vuart.c:aspeed_vuart_probe(), the code 
jumps to err_sysfs_remove:

drivers/tty/serial/8250/8250_aspeed_vuart.c:aspeed_vuart_probe() {
    ...
    err_sysfs_remove:
        sysfs_remove_group(&vuart->dev->kobj, &aspeed_vuart_attr_group);
        return rc;
}

This error path returns while leaving the 8250 port registered and the timer 
active. The devm-allocated vuart memory is subsequently freed, leaving a 
dangling pointer. 

Should this error path also call serial8250_unregister_port() and 
timer_delete_sync() to prevent a use-after-free if userspace interacts with 
the lingering device?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1785932211.git.gregoire.layet@9elements.com?part=5

  reply	other threads:[~2026-08-05 12:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 12:19 [PATCH v5 0/6] soc: aspeed: Add BMC and host driver for PCIe BMC device Grégoire Layet
2026-08-05 12:19 ` [PATCH v5 1/6] dt-bindings: serial: 8250: aspeed: add ast2600 and aspeed,vuart-over-pci Grégoire Layet
2026-08-05 12:25   ` sashiko-bot
2026-08-07  7:23   ` Krzysztof Kozlowski
2026-08-05 12:19 ` [PATCH v5 2/6] serial: 8250_aspeed_vuart: add aspeed,ast2600-vuart compatible string Grégoire Layet
2026-08-05 12:31   ` sashiko-bot
2026-08-07  8:37   ` Tan Siewert
2026-08-05 12:19 ` [PATCH v5 3/6] serial: 8250_aspeed_vuart: add VUART over PCI Grégoire Layet
2026-08-05 12:33   ` sashiko-bot
2026-08-07  8:37   ` Tan Siewert
2026-08-05 12:19 ` [PATCH v5 4/6] soc: mfd: add ASPEED AST2600 PCIe BMC device driver Grégoire Layet
2026-08-05 12:30   ` sashiko-bot
2026-08-07  8:37   ` Tan Siewert
2026-08-10 10:36     ` Grégoire Layet
2026-08-05 12:19 ` [PATCH v5 5/6] ARM: dts: aspeed: g6: Change vuart compatible string for ast2600 Grégoire Layet
2026-08-05 12:27   ` sashiko-bot [this message]
2026-08-07  8:37   ` Tan Siewert
2026-08-05 12:19 ` [PATCH v5 6/6] ARM: dts: aspeed: g6: add aspeed,vuart-over-pci prop to vuart3 and 4 Grégoire Layet
2026-08-05 12:30   ` sashiko-bot
2026-08-07  8:37   ` Tan Siewert

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=20260805122731.DBF111F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregoire.layet@9elements.com \
    --cc=lee@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=robh@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.