Skip to contentSkip to conversation

cifs: Fix crash on unload of cifs_arc4.ko

PATCH Applied Vincent Whitchurch 2 participants 2 messages Dec 7, 2021 – Dec 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: Fix crash on unload of cifs_arc4.ko

The exit function is wrongly placed in the __init section and this leads to a crash when the module is unloaded. Just remove both the init and exit functions since this module does not need them.

Fixes 71c02863246167b3d ("cifs: fork arc4 and create a separate module...")
---
 fs/smbfs_common/cifs_arc4.c | 13 -------------
 1 file changed, 13 deletions(-)
fs/smbfs_common/cifs_arc4.c +0 -13
index 85ba15a60b13..043e4cb839fa 100644
@@ -72,16 +72,3 @@ void cifs_arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int l
 	ctx->y = y;
 }
 EXPORT_SYMBOL_GPL(cifs_arc4_crypt);
-
-static int __init
-init_smbfs_common(void)
-{
-	return 0;
-}
-static void __init
-exit_smbfs_common(void)
-{
-}
-
-module_init(init_smbfs_common)
-module_exit(exit_smbfs_common)
Signature · 1 line
2.33.1
Applied
#1 lore raw

merged into cifs-2.6.git for-next

Quoted 36 lines · Vincent Whitchurch via samba-technical

The exit function is wrongly placed in the __init section and this leads to a crash when the module is unloaded. Just remove both the init and exit functions since this module does not need them.

Fixes 71c02863246167b3d ("cifs: fork arc4 and create a separate module...")
---
 fs/smbfs_common/cifs_arc4.c | 13 -------------
 1 file changed, 13 deletions(-)
fs/smbfs_common/cifs_arc4.c +0 -14
index 85ba15a60b13..043e4cb839fa 100644
@@ -72,16 +72,3 @@ void cifs_arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int l
        ctx->y = y;
 }
 EXPORT_SYMBOL_GPL(cifs_arc4_crypt);
-
-static int __init
-init_smbfs_common(void)
-{
-       return 0;
-}
-static void __init
-exit_smbfs_common(void)
-{
-}
-
-module_init(init_smbfs_common)
-module_exit(exit_smbfs_common)
--

2.33.1

Signature · 3 lines
Thanks,

Steve