[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHA+R7NB8sz1-W=QEmGxQkRyUmcMM6BzE7pZNU0W2_jzDfJjNw@mail.gmail.com>
Date: Fri, 10 Jan 2014 16:49:11 -0800
From: Cong Wang <cwang@...pensource.com>
To: Daniel Borkmann <dborkman@...hat.com>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net-next] net: vxlan: when lower dev unregisters remove
vxlan dev as well
On Fri, Jan 10, 2014 at 2:35 PM, Daniel Borkmann <dborkman@...hat.com> wrote:
> @@ -2673,13 +2712,14 @@ static __net_init int vxlan_init_net(struct net *net)
> static __net_exit void vxlan_exit_net(struct net *net)
> {
> struct vxlan_net *vn = net_generic(net, vxlan_net_id);
> - struct vxlan_dev *vxlan;
> - LIST_HEAD(list);
> + struct vxlan_dev *vxlan, *next;
> + LIST_HEAD(list_kill);
>
> rtnl_lock();
> - list_for_each_entry(vxlan, &vn->vxlan_list, next)
> - unregister_netdevice_queue(vxlan->dev, &list);
> - unregister_netdevice_many(&list);
> + list_for_each_entry_safe(vxlan, next, &vn->vxlan_list, next)
> + vxlan_dellink(vxlan->dev, &list_kill);
> + unregister_netdevice_many(&list_kill);
> + list_del(&list_kill);
The last list_del() looks suspicous... Since list_kill is a local list head,
why do we need to delete the head at the end??
Also, I still fail to see why you change vxlan_exit_net() here,
it looks a different bug irrelevant to netdev notifier.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists