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: <cc776b20-7fc0-4889-be27-29d6fcb3d3ad@nvidia.com>
Date: Wed, 10 Sep 2025 11:23:09 +0800
From: Jianbo Liu <jianbol@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>, Tariq Toukan <tariqt@...dia.com>
CC: Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>,
	Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>, "Mark
 Bloch" <mbloch@...dia.com>, <netdev@...r.kernel.org>,
	<linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Gal Pressman
	<gal@...dia.com>
Subject: Re: [PATCH net 1/3] net/mlx5e: Harden uplink netdev access against
 device unbind



On 9/10/2025 9:23 AM, Jakub Kicinski wrote:
> On Mon, 8 Sep 2025 13:07:04 +0300 Tariq Toukan wrote:
>> +	struct net_device *netdev = mlx5_uplink_netdev_get(dev);
>> +	struct mlx5e_priv *priv;
>> +	int err;
>> +
>> +	if (!netdev)
>> +		return 0;
> 
> Please don't call in variable init functions which require cleanup
> or error checking.

But in this function, a NULL return from mlx5_uplink_netdev_get is a 
valid condition where it should simply return 0. No cleanup or error 
check is needed.

Thanks!
Jianbo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ