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: <9cf08624-cd84-41bf-beef-ca3b3573303e@lunn.ch>
Date: Fri, 8 Nov 2024 22:43:04 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
	Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Marion & Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [net-next PATCH] net: dsa: add devm_dsa_register_switch()

On Fri, Nov 08, 2024 at 09:53:48PM +0100, Christian Marangi wrote:
> On Fri, Nov 08, 2024 at 09:35:32PM +0100, Andrew Lunn wrote:
> > > +int devm_dsa_register_switch(struct device *dev, struct dsa_switch *ds)
> > > +{
> > > +	int err;
> > > +
> > > +	err = dsa_register_switch(ds);
> > > +	if (err)
> > > +		return err;
> > > +
> > > +	return devm_add_action_or_reset(dev, devm_dsa_unregister_switch, ds);
> > > +}
> > > +EXPORT_SYMBOL_GPL(dsa_register_switch);
> > 
> > This looks to be the wrong function name.
> >
> 
> Ah... Anyway aside from this, is the feature OK? Questioning why it
> wasn't proposed early...

Some people blindly make use of devm_ without thinking about
ordering. These helpers can introduce bugs. So they are not always
liked.

It would be best if you added the helper at the same time as its user.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ