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: <CAKxU2N8-bPnkouJ_95U9NkRh7AP94MuMJTMeThWQhnuL1n0SMg@mail.gmail.com>
Date: Mon, 12 Aug 2024 19:50:29 -0700
From: Rosen Penev <rosenp@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com, 
	kuba@...nel.org, pabeni@...hat.com, linux@...linux.org.uk, 
	linux-kernel@...r.kernel.org, o.rempel@...gutronix.de
Subject: Re: [PATCH net-next 2/3] net: ag71xx: use devm for of_mdiobus_register

On Mon, Aug 12, 2024 at 7:41 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Mon, Aug 12, 2024 at 02:35:45PM -0700, Rosen Penev wrote:
> > On Mon, Aug 12, 2024 at 2:28 PM Andrew Lunn <andrew@...n.ch> wrote:
> > >
> > > On Mon, Aug 12, 2024 at 12:06:52PM -0700, Rosen Penev wrote:
> > > > Allows removing ag71xx_mdio_remove.
> > > >
> > > > Removed local mii_bus variable and assign struct members directly.
> > > > Easier to reason about.
> > >
> > > This mixes up two different things, making the patch harder to
> > > review. Ideally you want lots of little patches, each doing one thing,
> > > and being obviously correct.
> > >
> > > Is ag->mii_bus actually used anywhere, outside of ag71xx_mdio_probe()?
> > > Often swapping to devm_ means the driver does not need to keep hold of
> > > the resources. So i actually think you can remove ag->mii_bus. This
> > > might of been more obvious if you had first swapped to
> > > devm_of_mdiobus_register() without the other changes mixed in.
> > not sure I follow. mdiobus_unregister would need to be called in
> > remove without devm. That would need a private mii_bus of some kind.
> > So with devm this is unneeded?
>
> If you use devm_of_mdiobus_register(), the device core will call
> devm_mdiobus_unregister() on remove. Your patch removed
> mdiobus_unregister() in remove....
>
> Is there any user of ag->mii_bus left after converting to
> devm_of_mdiobus_register()?
There is not. I've applied the change removing mii_bus from ag locally.

>From testing, nothing has blown up. Although there's still a problem
with switched ports (except for lan1) dying after a while. I think
that bug's in qca8k though.

calling restart results in no surprises, unlike with some of my other
questionable patches.
>
>         Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ