Patch "x86/hyperv: Remove unregister syscore call from Hyper-V cleanup" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-hyperv-remove-unregister-syscore-call-from-hyper.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a0783138887b74436eca2c645b76a74079e5256d
Author: Gaurav Kohli <gauravkohli@xxxxxxxxxxxxxxxxxxx>
Date:   Fri Nov 25 22:14:51 2022 -0800

    x86/hyperv: Remove unregister syscore call from Hyper-V cleanup
    
    [ Upstream commit 32c97d980e2eef25465d453f2956a9ca68926a3c ]
    
    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@xxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Michael Kelley <mikelley@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1669443291-2575-1-git-send-email-gauravkohli@xxxxxxxxxxxxxxxxxxx
    Signed-off-by: Wei Liu <wei.liu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index 01860c0d324d..70fd21ebb9d5 100644
--- a/arch/x86/hyperv/hv_init.c
+++ b/arch/x86/hyperv/hv_init.c
@@ -453,8 +453,6 @@ void hyperv_cleanup(void)
 {
 	union hv_x64_msr_hypercall_contents hypercall_msr;
 
-	unregister_syscore_ops(&hv_syscore_ops);
-
 	/* Reset our OS id */
 	wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux