From: Wei Liu <wei.liu@kernel.org>
To: mhklinux@outlook.com
Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, longli@microsoft.com,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] Drivers: hv: vmbus: Skip VMBus module cleanup for non-nested root partition
Date: Sun, 23 Aug 2026 17:33:06 -0700 [thread overview]
Message-ID: <20260824003306.GG3566091@liuwe-devbox-debian-v2.local> (raw)
In-Reply-To: <20260812145223.85949-1-mhklinux@outlook.com>
On Wed, Aug 12, 2026 at 07:52:23AM -0700, Michael Kelley wrote:
> The VMBus module initialization function, hv_acpi_init(), currently
> does nothing when running in the root partition and root is not nested
> in another VM. But the initialization function reports success, so the
> VMBus module is indeed loaded. VMBus functionality is not actually
> needed, but the VMBus module must be loaded so that hv_vmbus_exists()
> can answer correctly. Furthermore, the mshv_root dependency on the
> VMBus module is needed as described in the commit message for
> 840b740a35bf ("mshv: Add conditional VMBus dependency").
>
> Loading the VMBus module without actually initializing it causes
> failures if the module should later be unloaded. The module unload code
> tries to clean up things that were never initialized, resulting in
> memory faults and a panic.
>
> Fix this by having VMBus module exit function perform the same
> check for non-nested root partition, and do nothing in such a
> case, just like hv_acpi_init().
>
> In the long run, the code that manages the Hyper-V provided SynIC
> should be refactored to better coordinate the requirements of
> root partition scenarios and normal VM scenarios, and to hopefully
> remove the hv_vmbus_exists() dependnecy between mshv_root and
> VMBus modules. Preventing the current unload failure scenario is
> an expediency until such a refactoring is done.
>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/linux-hyperv/20260721154943.A09BD1F00A3D@smtp.kernel.org/
> Fixes: 7e279d78664aa ("Drivers: hv: vmbus: skip VMBus initialization if Linux is root")
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
> Reviewed-by: Easwar Hariharan <easwar.hariharan@linux.microsoft.com>
Applied. Thanks.
prev parent reply other threads:[~2026-08-24 0:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 14:52 [PATCH v3 1/1] Drivers: hv: vmbus: Skip VMBus module cleanup for non-nested root partition Michael Kelley
2026-08-24 0:33 ` Wei Liu [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=20260824003306.GG3566091@liuwe-devbox-debian-v2.local \
--to=wei.liu@kernel.org \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mhklinux@outlook.com \
/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.