Message ID | 1382534973-13197-12-git-send-email-xiaoguangrong@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 1bcc8c8..5b42858 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4710,8 +4710,8 @@ int kvm_mmu_module_init(void) goto nomem; mmu_shadow_page_cache = kmem_cache_create("mmu_shadow_page_cache", - PAGE_SIZE, PAGE_SIZE, 0, - init_shadow_page_table); + PAGE_SIZE, PAGE_SIZE, SLAB_DESTROY_BY_RCU, + init_shadow_page_table); if (!mmu_shadow_page_cache) goto nomem;
Use SLAB_DESTROY_BY_RCU to prevent the shadow page to be freed from the slab, so that it can be locklessly accessed by holding rcu lock Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> --- arch/x86/kvm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)