Skip to content

Commit a50fc7b

Browse files
sunilmutmerwick
authored andcommitted
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: 81b18bc ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic") Signed-off-by: Sunil Muthuswamy <[email protected]> Signed-off-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 8afc06d) Orabug: 28671425 Signed-off-by: Liam Merwick <[email protected]> Reviewed-by: Darren Kenny <[email protected]> Reviewed-by: Alejandro Jimenez <[email protected]> Tested-by: Vijay Balakrishna <[email protected]>
1 parent 5b6331f commit a50fc7b

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

drivers/hv/vmbus_drv.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,11 +1176,8 @@ static int vmbus_bus_init(void)
11761176

11771177
bus_unregister(&hv_bus);
11781178
free_page((unsigned long)hv_panic_page);
1179-
if (!hv_ctl_table_hdr) {
1180-
unregister_sysctl_table(hv_ctl_table_hdr);
1181-
hv_ctl_table_hdr = NULL;
1182-
}
1183-
1179+
unregister_sysctl_table(hv_ctl_table_hdr);
1180+
hv_ctl_table_hdr = NULL;
11841181
return ret;
11851182
}
11861183

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

18931890
free_page((unsigned long)hv_panic_page);
1894-
if (!hv_ctl_table_hdr) {
1895-
unregister_sysctl_table(hv_ctl_table_hdr);
1896-
hv_ctl_table_hdr = NULL;
1897-
}
1898-
1891+
unregister_sysctl_table(hv_ctl_table_hdr);
1892+
hv_ctl_table_hdr = NULL;
18991893
bus_unregister(&hv_bus);
19001894

19011895
cpuhp_remove_state(hyperv_cpuhp_online);

0 commit comments

Comments
 (0)