Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dexuan Cui" <decui@microsoft.com>, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: hv: Don't use container_of() on non-vPCI buses in config block ops
Date: Thu, 19 Nov 2026 19:34:49 +0000	[thread overview]
Message-ID: <sashiko-outbox-223938@kernel.org> (raw)
In-Reply-To: <20261119192937.570043-1-decui@microsoft.com>

> From: Aditya Bhamidipati <abhamidipati@microsoft.com>
> 
> hv_read_config_block(), hv_write_config_block() and
> hv_register_block_invalidate() are exported through hvpci_block_ops for
> mlx5_core, which calls them for its PCI function whenever it runs in a
> Hyper-V guest. They assume that pdev->bus->sysdata is embedded in a
> struct hv_pcibus_device and use container_of() on it.
> 
> That only holds for buses created by pci-hyperv. A Hyper-V guest can also
> have PCI devices behind other host bridges, for example the ACPI-enumerated
> ECAM root ports used for ePCIe (emulated PCIe) device assignment on Azure.
> For such a device, container_of() yields a bogus hv_pcibus_device, and
> mlx5_core crashes on a ConnectX VF. On a 7.0-based kernel it crashes in
> get_pcichild_wslot(), called from hv_register_block_invalidate() while
> the VF probes. On a 7.3-based kernel the VHCA invalidate work sends a
> [ ... ]
> 
> Fixes: e5d2f910cfec ("PCI: hv: Add a paravirtual backchannel in software")
> Cc: stable@vger.kernel.org
> Signed-off-by: Aditya Bhamidipati <abhamidipati@microsoft.com>
> Signed-off-by: Dexuan Cui <decui@microsoft.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119192937.570043-1-decui@microsoft.com?part=1


      reply	other threads:[~2026-11-19 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 19:29 [PATCH] PCI: hv: Don't use container_of() on non-vPCI buses in config block ops Dexuan Cui
2026-11-19 19:34 ` 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-223938@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=decui@microsoft.com \
    --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