Skip to contentSkip to conversation

arch/x86: Use RCU_INIT_POINTER(x, NULL) in kvm/vmx.c

PATCH New Monam Agarwal 1 participant 1 message Mar 22, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86: Use RCU_INIT_POINTER(x, NULL) in kvm/vmx.c

Here rcu_assign_pointer() is ensuring that the initialization of a structure is carried out before storing a pointer to that structure.
So, rcu_assign_pointer(p, NULL) can always safely be converted to RCU_INIT_POINTER(p, NULL).

---
 arch/x86/kvm/vmx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx.c +1 -1
index 3927528..e37c0da 100644
@@ -8787,7 +8787,7 @@ static void __exit vmx_exit(void)
 	free_page((unsigned long)vmx_vmread_bitmap);
 
 #ifdef CONFIG_KEXEC
-	rcu_assign_pointer(crash_vmclear_loaded_vmcss, NULL);
+	RCU_INIT_POINTER(crash_vmclear_loaded_vmcss, NULL);
 	synchronize_rcu();
 #endif
 
Signature · 1 line
1.7.9.5