Re: [PATCH 1/1] Drivers: hv: vmbus: Fail VMBus module init for non-nested root partition
[email protected] Tue, 04 Aug 2026 19:21:26 +0000
| Newsgroups | org.kernel.vger.linux-hyperv |
|---|---|
| Message-ID | <[email protected]> |
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 modu= le 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 n= on-nested root partition --- commit 49405a084beb024e2ba8a360ff4836611b21617d Author: Michael Kelley <[email protected]> Drivers: hv: vmbus: Fail VMBus module init for non-nested root partition This commit changes the VMBus module initialization to return -ENODEV inste= ad 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 initialize= d. Closes: https://lore.kernel.org/linux-hyperv/20260721154943.A09BD1F00A3D@sm= tp.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; > =20 > 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. > =20 > /* > * Get ACPI resources first. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260804190517.1019= [email protected]?part=3D1