Re: [PATCH net-next] net: core: decouple ifalias get/set from rtnl lock

2017-10-02 Thread Florian Westphal
David Miller wrote: > From: Florian Westphal > Date: Fri, 29 Sep 2017 13:21:50 +0200 > > > @@ -1488,7 +1484,7 @@ static void netdev_release(struct device *d) > > > > BUG_ON(dev->reg_state != NETREG_RELEASED); > > > > - kfree(dev->ifalias); > > + kfree(rcu_access_pointer(dev->ifalias)

Re: [PATCH net-next] net: core: decouple ifalias get/set from rtnl lock

2017-10-01 Thread David Miller
From: Florian Westphal Date: Fri, 29 Sep 2017 13:21:50 +0200 > @@ -1488,7 +1484,7 @@ static void netdev_release(struct device *d) > > BUG_ON(dev->reg_state != NETREG_RELEASED); > > - kfree(dev->ifalias); > + kfree(rcu_access_pointer(dev->ifalias)); > netdev_freemem(dev); >

[PATCH net-next] net: core: decouple ifalias get/set from rtnl lock

2017-09-29 Thread Florian Westphal
Device alias can be set by either rtnetlink (rtnl is held) or sysfs. rtnetlink hold the rtnl mutex, sysfs acquires it for this purpose. Add an extra mutex for it plus a seqcount to get a consistent snapshot of the alias buffer. This allows the sysfs path to not take rtnl and would later allow to