On Fri, Jun 26, 2015 at 6:04 PM, Andrew Lunn <and...@lunn.ch> wrote: > On Thu, Jun 25, 2015 at 04:50:13PM +0300, gil...@ezchip.com wrote: >> From: Gilad Ben-Yossef <gi...@benyossef.com> >> >> DSA master netdev promiscuity counter was not being properly >> decremented on slave device open error path. >> ...
> Acked-by: Andrew Lunn <and...@lunn.ch> Thank you Andrew. > > FYI: I grep'ed the whole kernel. This seems to be the only place 0 is > passed to dev_set_promiscuity(), i.e. the same bug is not present > anywhere else. > It has occurred to me that dev_set_promiscuity() and its brethren dev_set_allmulti() may not be the best of interfaces: - On cursory inspection of code using these function their name implies the value of the relevant counter is set to the value passed as parameter, not incremented by it. - No caller I've managed to spot passes anything but -1 or 1 It seems an interface of int dev_set_promiscuity(struct net_device *dev, bool on); int dev_set_allmulti(struct net_device *dev, bool on); would be as functional (for current users), more readable and less error prone but I am not sure such a tiny problem (if you can call this a problem) is worth the churn... Gilad -- Gilad Ben-Yossef Chief Coffee Drinker gi...@benyossef.com Israel Cell: +972-52-8260388 US Cell: +1-973-8260388 http://benyossef.com "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html