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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 12 Dec 2007 16:47:25 +0800
From:	Wang Chen <>
To:	"David S. Miller" <>,
	Jeff Garzik <>
CC:, Wang Chen <>
Subject: [PATCH 2/4] cxgb3: rtnl_lock out of loop will be faster

[PATCH 2/4] [NETDEV] cxgb3: rtnl_lock out of loop will be faster

Before this patch, it gets and releases the lock at each
iteration of the loop. Changing unregister_netdev to
unregister_netdevice and locking outside of the loop will
be faster for this approach.

Signed-off-by: Wang Chen <>
 cxgb3_main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

---	2007-12-12 10:19:39.000000000 +0800
+++ linux-2.6.24.rc5/drivers/net/cxgb3/cxgb3_main.c	2007-12-12 15:19:15.000000000 +0800
@@ -2584,9 +2584,11 @@ static void __devexit remove_one(struct 
+		rtnl_lock();
 		for_each_port(adapter, i)
 		    if (test_bit(i, &adapter->registered_device_map))
-			unregister_netdev(adapter->port[i]);
+			unregister_netdevice(adapter->port[i]);
+		rtnl_unlock();
 		if (is_offload(adapter)) {

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists