Subject: Re: [Patch net-next] vxlan: do not use vxlan_net before checking event type

From: Fan Du <[email-masked]>
Date: Fri, 17 Jan 2014 12:28:42 +0800

Hi, Cong

On 2014年01月17日 12:20, Cong Wang wrote:
> When cloning a netns, loopback device will be registered
> and therefore an event will be notified. Of course
> vxlan doesn't care about it, therefore should check if it
> is NETDEV_UNREGISTER before getting the vxlan_net struct.
> Otherwise, vxlan_net is probably not initialized yet at
> this point.

I'm bit new to vxlan, but in vxlan_init_module

register_pernet_device is called before register_netdevice_notifier.
By my understanding once register_pernet_device is called,
then subsequent vxlan_notifier_block callback see a valid vxlan_net_id.
I mean execute vxlan_notifier_block callback indicates a valid vxlan_net_id,
or I miss somewhere else.

-- 
浮沉随浪只记今朝笑

--fan