blob: 084ae74bfd63b864c6a50fce339ceb531cdb9b1c [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: "Jason A. Donenfeld" <Jason@zx2c4.com>
3Date: Fri, 15 Jan 2021 20:30:12 +0100
4Subject: [PATCH] crypto: lib/chacha20poly1305 - define empty module exit
5 function
6
7commit ac88c322d0f2917d41d13553c69e9d7f043c8b6f upstream.
8
9With no mod_exit function, users are unable to unload the module after
10use. I'm not aware of any reason why module unloading should be
11prohibited for this one, so this commit simply adds an empty exit
12function.
13
14Reported-and-tested-by: John Donnelly <john.p.donnelly@oracle.com>
15Acked-by: Ard Biesheuvel <ardb@kernel.org>
16Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
17Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
19---
20 lib/crypto/chacha20poly1305.c | 5 +++++
21 1 file changed, 5 insertions(+)
22
23--- a/lib/crypto/chacha20poly1305.c
24+++ b/lib/crypto/chacha20poly1305.c
25@@ -364,7 +364,12 @@ static int __init mod_init(void)
26 return 0;
27 }
28
29+static void __exit mod_exit(void)
30+{
31+}
32+
33 module_init(mod_init);
34+module_exit(mod_exit);
35 MODULE_LICENSE("GPL v2");
36 MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");
37 MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>");