Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8afc06dd authored by Sunil Muthuswamy's avatar Sunil Muthuswamy Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: vmbus: Fix the issue with freeing up hv_ctl_table_hdr



The check to free the Hyper-V control table header was reversed. This
fixes it.

Fixes: 81b18bce ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")

Signed-off-by: default avatarSunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ddcaf3ca
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -1176,11 +1176,8 @@ static int vmbus_bus_init(void)

	bus_unregister(&hv_bus);
	free_page((unsigned long)hv_panic_page);
	if (!hv_ctl_table_hdr) {
	unregister_sysctl_table(hv_ctl_table_hdr);
	hv_ctl_table_hdr = NULL;
	}

	return ret;
}

@@ -1891,11 +1888,8 @@ static void __exit vmbus_exit(void)
	}

	free_page((unsigned long)hv_panic_page);
	if (!hv_ctl_table_hdr) {
	unregister_sysctl_table(hv_ctl_table_hdr);
	hv_ctl_table_hdr = NULL;
	}

	bus_unregister(&hv_bus);

	cpuhp_remove_state(hyperv_cpuhp_online);