Commit 22c1d8f2 authored by Gaurav Kohli's avatar Gaurav Kohli Committed by Greg Kroah-Hartman
Browse files

x86/hyperv: Remove unregister syscore call from Hyper-V cleanup



[ Upstream commit 32c97d98 ]

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: default avatarGaurav Kohli <gauravkohli@linux.microsoft.com>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1669443291-2575-1-git-send-email-gauravkohli@linux.microsoft.com


Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9b267051
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment