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: <20250709194717.101a7a22@kernel.org>
Date: Wed, 9 Jul 2025 19:47:17 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: 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 <saeed@...nel.org>, Gal Pressman
 <gal@...dia.com>, "Leon Romanovsky" <leon@...nel.org>, Saeed Mahameed
 <saeedm@...dia.com>, Mark Bloch <mbloch@...dia.com>,
 <netdev@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 3/5] net/mlx5e: Replace recursive VLAN push
 handling with an iterative loop

On Wed, 9 Jul 2025 00:16:25 +0300 Tariq Toukan wrote:
> +		rcu_read_lock();
> +		*out_dev = dev_get_by_index_rcu(dev_net(vlan_dev),
> +						dev_get_iflink(vlan_dev));
> +		rcu_read_unlock();
> +		if (!*out_dev)
> +			return -ENODEV;
> +	} while (is_vlan_dev(*out_dev));

Would be good adding a comment here to explain why this odd rcu lock
/ lookup / rcu unlock / keep using the return value outside of rcu
protection - code flow is correct :S

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ