Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hongyan Xu" <getshell@seu.edu.cn>, linux-pci@vger.kernel.org
Subject: Re: [PATCH 3/3] PCI: thunder-pem, hisi, thunder-ecam: Fix ECAM config window use-after-free
Date: Sun, 08 Nov 2026 11:00:03 +0000	[thread overview]
Message-ID: <sashiko-outbox-203686@kernel.org> (raw)
In-Reply-To: <20261108105640.875-4-getshell@seu.edu.cn>

> thunder-pem, hisi and thunder-ecam set .probe = pci_host_common_probe but
> have no ->remove, so unbinding only runs devres_release_all():
> gen_pci_unmap_cfg() -> pci_ecam_free() frees the ECAM config window while
> the bus tree stays registered - only pci_remove_bus() unlinks a bus, and
> only pci_host_common_remove() reaches it for a root bus.  The next config
> access in pci_ecam_map_bus() reads cfg->ops->bus_shift.
> Trigger: DT overlay removal of the node that supplied or enabled it.
> 
> Fix: give each driver the same .remove = pci_host_common_remove that
> pci-host-generic.c got in commit 01fcb7f777a9 ("PCI: Add support for
> unbinding the generic PCI host controller"), so the unlink comes first.
> 
> Fixes: f12b76e56ada ("PCI: thunder: Add PCIe host driver for ThunderX processors")
> Fixes: a2ec1996098c ("PCI: hisi: Add DT almost-ECAM support for Hip06/Hip07 host controllers")
> Fixes: 7b6e7ba8e81a ("PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261108105640.875-1-getshell@seu.edu.cn?part=3


      reply	other threads:[~2026-11-08 11:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08 10:56 [PATCH 0/3] PCI: Fix ECAM config window use-after-free in five drivers Hongyan Xu
2026-11-08 10:56 ` [PATCH 1/3] PCI: apple: Fix ECAM config window use-after-free Hongyan Xu
2026-11-08 11:14   ` sashiko-bot
2026-11-08 14:21   ` Marc Zyngier
2026-11-08 10:56 ` [PATCH 2/3] PCI: microchip: " Hongyan Xu
2026-11-08 11:06   ` sashiko-bot
2026-11-08 10:56 ` [PATCH 3/3] PCI: thunder-pem, hisi, thunder-ecam: " Hongyan Xu
2026-11-08 11:00   ` 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-203686@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=getshell@seu.edu.cn \
    --cc=linux-pci@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