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] [day] [month] [year] [list]
Message-ID: <CAKxU2N__+EEAryXsYr0f1i6B4q4fBmJTVVFYROtg0LZxjMe8fw@mail.gmail.com>
Date: Mon, 1 Sep 2025 14:23:17 -0700
From: Rosen Penev <rosenp@...il.com>
To: Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org, Sunil Goutham <sgoutham@...vell.com>, 
	Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	"moderated list:ARM/CAVIUM THUNDER NETWORK DRIVER" <linux-arm-kernel@...ts.infradead.org>, 
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: thunder_bgx: use OF loop instead of fwnode

On Mon, Sep 1, 2025 at 8:23 AM Simon Horman <horms@...nel.org> wrote:
>
> On Sat, Aug 30, 2025 at 02:42:17PM -0700, Rosen Penev wrote:
> > The loop ends up converting fwnode to device_node anyway.
> >
> > While at it, handle return value of of_get_mac_address in case of NVMEM.
>
> I think that this part should be a separate patch.
> Possibly targeted at net with a Fixes tag.
I'll split up.
>
> >
> > Simplify while loop iteration.
> >
> > Signed-off-by: Rosen Penev <rosenp@...il.com>
>
> ...
>
> > @@ -1514,14 +1510,13 @@ static int bgx_init_of_phy(struct bgx *bgx)
> >       /* We are bailing out, try not to leak device reference counts
> >        * for phy devices we may have already found.
> >        */
> > -     while (lmac) {
> > +     while (lmac--) {
> >               if (bgx->lmac[lmac].phydev) {
> >                       put_device(&bgx->lmac[lmac].phydev->mdio.dev);
> >                       bgx->lmac[lmac].phydev = NULL;
> >               }
> > -             lmac--;
> >       }
>
> The update to this look looks correct to me, even without the rest of
> the patch separate. If so, I'm wondering if it should also be a separate
> patch. Again, possibly for net with a Fixes tag.
Maybe not. This can get called while lmac is 0, which is a u8. lmac--
like this will underflow. I'll send it as a separate patch from the
upcoming series targeted at next.
>
> > -     of_node_put(node);
> > +     of_node_put(child);
> >       return -EPROBE_DEFER;
> >  }
>
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ