[Devel] [PATCH RHEL7 COMMIT] KVM: remove __exit annotation from vmx_exit()

Konstantin Khorenko khorenko at virtuozzo.com
Wed Aug 15 12:14:22 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.11.6.vz7.64.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.11.6.el7
------>
commit f92f45ca6fa29c221055d7ee6492e3311c8b3e45
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Wed Aug 15 12:10:32 2018 +0300

    KVM: remove __exit annotation from vmx_exit()
    
    WARNING: arch/x86/kvm/kvm-intel.o(.init.text+0xace): Section mismatch in
    reference from the function init_module() to the function
    .exit.text:vmx_exit()
    
    The function __init init_module() references a function __exit
    vmx_exit().
    
    This is often seen when error handling in the init function uses
    functionality in the exit path.
    The fix is often to remove the __exit annotation of
    vmx_exit() so it may be used outside an exit section.
    
    Truely, __init vmx_init() calls vmx_exit(), so drop __exit annotation.
    
    https://jira.sw.ru/browse/PSBM-87699
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 21293b27559f..1b70a425220c 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -12091,7 +12091,7 @@ static void vmx_cleanup_l1d_flush(void)
 	l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO;
 }
 
-static void __exit vmx_exit(void)
+static void vmx_exit(void)
 {
 #ifdef CONFIG_KEXEC_CORE
 	RCU_INIT_POINTER(crash_vmclear_loaded_vmcss, NULL);


More information about the Devel mailing list