提交 8afc06dd 编写于 作者: S Sunil Muthuswamy 提交者: Greg Kroah-Hartman

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: NSunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ddcaf3ca
...@@ -1176,11 +1176,8 @@ static int vmbus_bus_init(void) ...@@ -1176,11 +1176,8 @@ static int vmbus_bus_init(void)
bus_unregister(&hv_bus); bus_unregister(&hv_bus);
free_page((unsigned long)hv_panic_page); free_page((unsigned long)hv_panic_page);
if (!hv_ctl_table_hdr) { unregister_sysctl_table(hv_ctl_table_hdr);
unregister_sysctl_table(hv_ctl_table_hdr); hv_ctl_table_hdr = NULL;
hv_ctl_table_hdr = NULL;
}
return ret; return ret;
} }
...@@ -1891,11 +1888,8 @@ static void __exit vmbus_exit(void) ...@@ -1891,11 +1888,8 @@ static void __exit vmbus_exit(void)
} }
free_page((unsigned long)hv_panic_page); free_page((unsigned long)hv_panic_page);
if (!hv_ctl_table_hdr) { unregister_sysctl_table(hv_ctl_table_hdr);
unregister_sysctl_table(hv_ctl_table_hdr); hv_ctl_table_hdr = NULL;
hv_ctl_table_hdr = NULL;
}
bus_unregister(&hv_bus); bus_unregister(&hv_bus);
cpuhp_remove_state(hyperv_cpuhp_online); cpuhp_remove_state(hyperv_cpuhp_online);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册