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: <20250610171522.2119030-3-stfomichev@gmail.com>
Date: Tue, 10 Jun 2025 10:15:20 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	skalluru@...vell.com,
	manishc@...vell.com,
	andrew+netdev@...n.ch,
	michael.chan@...adcom.com,
	pavan.chebbi@...adcom.com,
	ajit.khaparde@...adcom.com,
	sriharsha.basavapatna@...adcom.com,
	somnath.kotur@...adcom.com,
	anthony.l.nguyen@...el.com,
	przemyslaw.kitszel@...el.com,
	tariqt@...dia.com,
	saeedm@...dia.com,
	louis.peens@...igine.com,
	shshaikh@...vell.com,
	GR-Linux-NIC-Dev@...vell.com,
	ecree.xilinx@...il.com,
	horms@...nel.org,
	dsahern@...nel.org,
	shuah@...nel.org,
	ruanjinjie@...wei.com,
	mheib@...hat.com,
	stfomichev@...il.com,
	linux-kernel@...r.kernel.org,
	intel-wired-lan@...ts.osuosl.org,
	linux-rdma@...r.kernel.org,
	oss-drivers@...igine.com,
	linux-net-drivers@....com,
	linux-kselftest@...r.kernel.org,
	leon@...nel.org
Subject: [PATCH net-next v3 2/4] net: remove redundant ASSERT_RTNL() in queue setup functions

The existing netdev_ops_assert_locked() already asserts that either
the RTNL lock or the per-device lock is held, making the explicit
ASSERT_RTNL() redundant.

Cc: Michael Chan <michael.chan@...adcom.com>
Signed-off-by: Stanislav Fomichev <stfomichev@...il.com>
---
 net/core/dev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index be97c440ecd5..72997636b8ec 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3179,7 +3179,6 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
 
 	if (dev->reg_state == NETREG_REGISTERED ||
 	    dev->reg_state == NETREG_UNREGISTERING) {
-		ASSERT_RTNL();
 		netdev_ops_assert_locked(dev);
 
 		rc = netdev_queue_update_kobjects(dev, dev->real_num_tx_queues,
@@ -3229,7 +3228,6 @@ int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
 		return -EINVAL;
 
 	if (dev->reg_state == NETREG_REGISTERED) {
-		ASSERT_RTNL();
 		netdev_ops_assert_locked(dev);
 
 		rc = net_rx_queue_update_kobjects(dev, dev->real_num_rx_queues,
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ