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]
Message-ID: <20200730211019.lsqar5vbrxu5xw2u@skbuf>
Date:   Fri, 31 Jul 2020 00:10:19 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Jonathan McDowell <noodles@...th.li>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Russell King - ARM Linux admin <linux@...linux.org.uk>,
        Matthew Hagan <mnhagan88@...il.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2] net: dsa: qca8k: Add 802.1q VLAN support

On Thu, Jul 30, 2020 at 11:40:29AM +0100, Jonathan McDowell wrote:
> > > +
> > > +	for (vid = vlan->vid_begin; vid <= vlan->vid_end && !ret; ++vid)
> > > +		ret = qca8k_vlan_add(priv, port, vid, !untagged);
> > > +
> > > +	if (ret)
> > > +		dev_err(priv->dev, "Failed to add VLAN to port %d (%d)", port, ret);
> > > +
> > 
> > If for some reason there is a temporary failure in qca8k_vlan_add, you'd
> > be swallowing it instead of printing the error and stopping the
> > execution.
> 
> I don't follow; I'm breaking out of the for loop when we get an error? I
> figured that was a better move than potentially printing 4095 error
> messages if they were all going to fail.
> 

Oh, you are. What an exotic way to write this loop, my brain stopped
parsing beyond "vid_end".

Thanks,
-Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ