KVM: x86: Tag kvm_mmu_x86_module_init() with __init
authorSean Christopherson <seanjc@google.com>
Wed, 3 Aug 2022 22:49:55 +0000 (22:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:22:49 +0000 (14:22 +0200)
commit69704ca43e08709697ee94043d20663bf4bb5711
tree40d4800d5e8993f14c07888feb4441853c277415
parent439fcac3d0e095cbb65d5b506c7e5dee3456444b
KVM: x86: Tag kvm_mmu_x86_module_init() with __init

commit 982bae43f11c37b51d2f1961bb25ef7cac3746fa upstream.

Mark kvm_mmu_x86_module_init() with __init, the entire reason it exists
is to initialize variables when kvm.ko is loaded, i.e. it must never be
called after module initialization.

Fixes: 1d0e84806047 ("KVM: x86/mmu: Resolve nx_huge_pages when kvm.ko is loaded")
Cc: stable@vger.kernel.org
Reviewed-by: Kai Huang <kai.huang@intel.com>
Tested-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220803224957.1285926-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c