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: <aPEiMgvd2QM59nvu@horms.kernel.org>
Date: Thu, 16 Oct 2025 17:49:54 +0100
From: Simon Horman <horms@...nel.org>
To: Shi Hao <i.shihao.999@...il.com>
Cc: netdev@...r.kernel.org, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org
Subject: Re: [PATCH] net :ethernet : replace cleanup_module with __exit()

On Thu, Oct 16, 2025 at 05:21:13PM +0530, Shi Hao wrote:
> 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);

Hi Shi Hao,

Thanks for your patch.

Unfortunately this does not compile as a built-in because
is only defined (and initialised) when this driver is configured as a module.

I was able to verify this using a configuration generated like this:

ARCH=arm make footbridge_defconfig
echo "CONFIG_3C515=y" >> .config
ARCH=arm make oldconfig

And building using the GCC 15.2.0 toolchain available here
https://mirrors.edge.kernel.org/pub/tools/crosstool/


Also, looking at git history, I think that '3c515:' would be an
appropriate prefix for this patch.

Subject: [PATCH net-next v2] 3c515: ...


And if you do post an update, please be sure to observe the 24h rule.
https://docs.kernel.org/process/maintainer-netdev.html

Thanks!

-- 
pw-bot: changes-requested

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ