Skip to content

Commit

Permalink
arch/x86: Use RCU_INIT_POINTER(x, NULL) in kvm/vmx.c
Browse files Browse the repository at this point in the history
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).

Signed-off-by: Monam Agarwal <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
MonamAgarwal authored and bonzini committed Aug 19, 2014
1 parent 15fc075 commit 3b63a43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -9097,7 +9097,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

Expand Down

0 comments on commit 3b63a43

Please sign in to comment.