Skip to content

Commit af08f54

Browse files
author
Herton R. Krzesinski
committed
Merge: x86/hyperv: Remove unregister syscore call from Hyper-V cleanup
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2034 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168542 Hyper-V cleanup code comes under panic path where preemption and irq is already disabled. So calling of unregister_syscore_ops might schedule out the thread even for the case where mutex lock is free. hyperv_cleanup unregister_syscore_ops mutex_lock(&syscore_ops_lock) might_sleep Here might_sleep might schedule out this thread, where voluntary preemption config is on and this thread will never comes back. And also this was added earlier to maintain the symmetry which is not required as this can comes during crash shutdown path only. To prevent the same, removing unregister_syscore_ops function call. Signed-off-by: Gaurav Kohli <gauravkohli@linux.microsoft.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/1669443291-2575-1-git-send-email-gauravkohli@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> (cherry picked from commit 32c97d9) Signed-off-by: Mohamed Gamal Morsy <mgamal@redhat.com> Approved-by: Cathy Avery <cavery@redhat.com> Approved-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2 parents f31a96c + 643074f commit af08f54

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/x86/hyperv/hv_init.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ void hyperv_cleanup(void)
535535
union hv_x64_msr_hypercall_contents hypercall_msr;
536536
union hv_reference_tsc_msr tsc_msr;
537537

538-
unregister_syscore_ops(&hv_syscore_ops);
539-
540538
/* Reset our OS id */
541539
wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
542540
hv_ghcb_msr_write(HV_X64_MSR_GUEST_OS_ID, 0);

0 commit comments

Comments
 (0)