Subject: Re: vxlan: use after free error

From: Stephen Hemminger <[email-masked]>
Date: Mon, 29 May 2017 08:32:47 -0700

On Mon, 29 May 2017 09:28:52 +0300
Mark Bloch <[email-masked]> wrote:

> In my patch I've added the code inside vxlan_sock_release()
> after we do:
>         rcu_assign_pointer(vxlan->vn6_sock, NULL);
>         rcu_assign_pointer(vxlan->vn4_sock, NULL);

Use RCU_INIT_POINTER when assigning NULL. A barrier is not necessary.