]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Aug 2022 19:08:24 +0000 (15:08 -0400)
commita00e5e7de373323f6205b8428fb2bf97bf194ec8
tree85dc7ef4b22322b91c1ab4569d5a04d45c78e9cf
parentd7f3e368d4bb67e455e1e3ecbb5d9c7b2b293323
KVM: x86: Tag kvm_mmu_x86_module_init() with __init

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: 0095af38a86a ("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>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c