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: <42091367-4dce-4c6f-8588-ffad8a66de3b@lunn.ch>
Date: Thu, 22 May 2025 14:30:00 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Arinzon, David" <darinzon@...zon.com>
Cc: David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Richard Cochran <richardcochran@...il.com>,
	"Woodhouse, David" <dwmw@...zon.co.uk>,
	"Machulsky, Zorik" <zorik@...zon.com>,
	"Matushevsky, Alexander" <matua@...zon.com>,
	"Bshara, Saeed" <saeedb@...zon.com>,
	"Wilson, Matt" <msw@...zon.com>,
	"Liguori, Anthony" <aliguori@...zon.com>,
	"Bshara, Nafea" <nafea@...zon.com>,
	"Schmeilin, Evgeny" <evgenys@...zon.com>,
	"Belgazal, Netanel" <netanel@...zon.com>,
	"Saidi, Ali" <alisaidi@...zon.com>,
	"Herrenschmidt, Benjamin" <benh@...zon.com>,
	"Kiyanovski, Arthur" <akiyano@...zon.com>,
	"Dagan, Noam" <ndagan@...zon.com>,
	"Bernstein, Amit" <amitbern@...zon.com>,
	"Allen, Neil" <shayagr@...zon.com>,
	"Ostrovsky, Evgeny" <evostrov@...zon.com>,
	"Tabachnik, Ofir" <ofirt@...zon.com>,
	"Machnikowski, Maciek" <maciek@...hnikowski.net>,
	Rahul Rameshbabu <rrameshbabu@...dia.com>,
	Gal Pressman <gal@...dia.com>,
	Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
	Leon Romanovsky <leon@...nel.org>
Subject: Re: [PATCH v9 net-next 5/8] net: ena: Add debugfs support to the ENA
 driver

On Thu, May 22, 2025 at 05:24:10AM +0000, Arinzon, David wrote:
> > > +void ena_debugfs_init(struct net_device *dev) {
> > > +     struct ena_adapter *adapter = netdev_priv(dev);
> > > +
> > > +     adapter->debugfs_base =
> > > +             debugfs_create_dir(dev_name(&adapter->pdev->dev), NULL);
> > > +     if (IS_ERR(adapter->debugfs_base))
> > > +             netdev_err(dev, "Failed to create debugfs dir\n");
> > 
> > Don't check return codes from debugfs_ calls. It does not matter if it fails, it is
> > just debug, and all debugfs_ calls are happy to take a NULL pointer,
> > ERR_PTR() etc.
> > 
> >         Andrew
> 
> Thank you for the feedback.
> We were looking to get a failure indication and not continue creating the rest of the nodes (patch 6/8).

That will automagically happen, because when you pass the ERR_PTR from
debugfs_create_dir() to other functions, they become NOPs.

If you look around, you will find bot drivers submitting patches
removing such checks, because they are not wanted nor needed.

	Andrew


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ