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-next>] [day] [month] [year] [list]
Message-ID: <20251016115113.43986-1-i.shihao.999@gmail.com>
Date: Thu, 16 Oct 2025 17:21:13 +0530
From: Shi Hao <i.shihao.999@...il.com>
To: netdev@...r.kernel.org
Cc: andrew+netdev@...n.ch,
	davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	Shi Hao <i.shihao.999@...il.com>
Subject: [PATCH] net :ethernet : replace cleanup_module with __exit()

update old legacy cleanup_module function from the file
with __exit module as per kernel code practices.

The file had an old cleanup_module function still in use
which could be updated with __exit function all though its
init_module is indeed newer however the cleanup_module
was still using the older version of exit.

To set proper exit module function replace cleanup_module
with __exit() corkscrew_exit_module to align it to the
kernel code consistency.

Signed-off-by: Shi Hao <i.shihao.999@...il.com>
---
 drivers/net/ethernet/3com/3c515.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c515.c b/drivers/net/ethernet/3com/3c515.c
index ecdea58e6a21..4f8cd5a6ee68 100644
--- a/drivers/net/ethernet/3com/3c515.c
+++ b/drivers/net/ethernet/3com/3c515.c
@@ -1547,9 +1547,7 @@ static const struct ethtool_ops netdev_ethtool_ops = {
 	.set_msglevel		= netdev_set_msglevel,
 };

-
-#ifdef MODULE
-void cleanup_module(void)
+static void __exit corkscrew_exit_module(void)
 {
 	while (!list_empty(&root_corkscrew_dev)) {
 		struct net_device *dev;
@@ -1563,4 +1561,4 @@ void cleanup_module(void)
 		free_netdev(dev);
 	}
 }
-#endif				/* MODULE */
+module_exit(corkscrew_exit_module);
--
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ