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: <20231119092530.13071-1-haifeng.xu@shopee.com>
Date: Sun, 19 Nov 2023 09:25:29 +0000
From: Haifeng Xu <haifeng.xu@...pee.com>
To: edumazet@...gle.com
Cc: andy@...yhouse.net,
	davem@...emloft.net,
	j.vosburgh@...il.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Haifeng Xu <haifeng.xu@...pee.com>
Subject: [PATCH v3 1/2] bonding: export devnet_rename_sem

This patch exports devnet_rename_sem variable, so it can be accessed in the
bonding modulde, not only being limited in net/core/dev.c.

Signed-off-by: Haifeng Xu <haifeng.xu@...pee.com>
Suggested-by: Eric Dumazet <edumazet@...gle.com>
---
 include/net/bonding.h | 3 +++
 net/core/dev.c        | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/net/bonding.h b/include/net/bonding.h
index 5b8b1b644a2d..6c16d778b615 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -780,6 +780,9 @@ extern const struct sysfs_ops slave_sysfs_ops;
 /* exported from bond_3ad.c */
 extern const u8 lacpdu_mcast_addr[];
 
+/* exported from net/core/dev.c */
+extern struct rw_semaphore devnet_rename_sem;
+
 static inline netdev_tx_t bond_tx_drop(struct net_device *dev, struct sk_buff *skb)
 {
 	dev_core_stats_tx_dropped_inc(dev);
diff --git a/net/core/dev.c b/net/core/dev.c
index af53f6d838ce..fdafab617227 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -197,7 +197,8 @@ static DEFINE_SPINLOCK(napi_hash_lock);
 static unsigned int napi_gen_id = NR_CPUS;
 static DEFINE_READ_MOSTLY_HASHTABLE(napi_hash, 8);
 
-static DECLARE_RWSEM(devnet_rename_sem);
+DECLARE_RWSEM(devnet_rename_sem);
+EXPORT_SYMBOL(devnet_rename_sem);
 
 static inline void dev_base_seq_inc(struct net *net)
 {
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ