All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michael Kelley" <mhkelley58@gmail.com>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Fail VMBus module init for non-nested root partition
Date: Tue, 04 Aug 2026 19:21:26 +0000	[thread overview]
Message-ID: <20260804192126.9B6851F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804190517.101981-1-mhklinux@outlook.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Returning -ENODEV in the root partition prevents the hv_vmbus module from loading, which breaks the loading of the mshv_root module when both are configured as loadable modules.
--

--- Patch [1]: [PATCH 1/1] Drivers: hv: vmbus: Fail VMBus module init for non-nested root partition ---
commit 49405a084beb024e2ba8a360ff4836611b21617d
Author: Michael Kelley <mhkelley58@gmail.com>

Drivers: hv: vmbus: Fail VMBus module init for non-nested root partition

This commit changes the VMBus module initialization to return -ENODEV instead
of 0 when running directly in the root partition and not nested. This is
intended to prevent the module from successfully loading and later causing
memory faults or a panic during unload when resources were never initialized.

Closes: https://lore.kernel.org/linux-hyperv/20260721154943.A09BD1F00A3D@smtp.kernel.org/

> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 6824bd7cb3c4f..7d5021ceea84f 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -2982,7 +2982,7 @@ static int __init hv_acpi_init(void)
>  		return -ENODEV;
>  
>  	if (hv_root_partition() && !hv_nested)
> -		return 0;
> +		return -ENODEV;

[Severity: High]
Does returning -ENODEV here break dependent modules when both are built as
loadable modules?

If the VMBus initialization returns an error on a non-nested root partition,
the hv_vmbus module will fail to load and its symbols (like hv_vmbus_exists())
will not be exported.

This would prevent the mshv_root module from loading on the root partition
since it depends on those exported symbols, completely breaking mshv_root
functionality in its only intended environment.

>  
>  	/*
>  	 * Get ACPI resources first.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260804190517.101981-1-mhklinux@outlook.com?part=1

  reply	other threads:[~2026-08-04 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 19:05 [PATCH 1/1] Drivers: hv: vmbus: Fail VMBus module init for non-nested root partition Michael Kelley
2026-08-04 19:21 ` sashiko-bot [this message]
2026-08-04 19:39 ` Easwar Hariharan
2026-08-04 22:17   ` Michael Kelley
2026-08-04 22:47     ` Easwar Hariharan
2026-08-04 22:48       ` Easwar Hariharan
2026-08-05  4:13         ` Michael Kelley
2026-08-05 17:24           ` Easwar Hariharan

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=20260804192126.9B6851F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=mhkelley58@gmail.com \
    --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.