lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Jul 2013 16:25:09 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Pravin Shelar <pshelar@...ira.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] vxlan: Fix vs->vni_list locking.

On Wed, 10 Jul 2013 16:08:38 -0700
Pravin Shelar <pshelar@...ira.com> wrote:

> On Wed, Jul 10, 2013 at 3:58 PM, Stephen Hemminger
> <stephen@...workplumber.org> wrote:
> > On Wed, 10 Jul 2013 15:04:44 -0700
> > Pravin B Shelar <pshelar@...ira.com> wrote:
> >
> >> Use rtnl lock to protect vs->vni_list updates.
> >>
> >> Signed-off-by: Pravin B Shelar <pshelar@...ira.com>
> >> ---
> >
> > I don't think this is necessary. I intentionally changed the
> > locking when socket management was moved to a work queue.
> > The vxlan_net socket lock is held there already, and finer grain.
> 
> what abt vxlan_dellink()?
> it is deleting vxlan-dev from hash table without lock.

Ok, then this should fix it.

--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1768,8 +1768,12 @@ static int vxlan_newlink(struct net *net
 static void vxlan_dellink(struct net_device *dev, struct list_head *head)
 {
        struct vxlan_dev *vxlan = netdev_priv(dev);
+       struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
 
+       spin_lock(&vn->sock_lock);
        hlist_del_rcu(&vxlan->hlist);
+       spin_unlock(&vn->sock_lock);
+
        list_del(&vxlan->next);
        unregister_netdevice_queue(dev, head);
 }
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ