b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: "Jason A. Donenfeld" <Jason@zx2c4.com> |
| 3 | Date: Fri, 15 Jan 2021 20:30:12 +0100 |
| 4 | Subject: [PATCH] crypto: lib/chacha20poly1305 - define empty module exit |
| 5 | function |
| 6 | |
| 7 | commit ac88c322d0f2917d41d13553c69e9d7f043c8b6f upstream. |
| 8 | |
| 9 | With no mod_exit function, users are unable to unload the module after |
| 10 | use. I'm not aware of any reason why module unloading should be |
| 11 | prohibited for this one, so this commit simply adds an empty exit |
| 12 | function. |
| 13 | |
| 14 | Reported-and-tested-by: John Donnelly <john.p.donnelly@oracle.com> |
| 15 | Acked-by: Ard Biesheuvel <ardb@kernel.org> |
| 16 | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> |
| 17 | Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
| 18 | Signed-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>"); |