diff mbox series

[v2] crypto: lib/chacha20poly1305 - define empty module exit function

Message ID 20210115193012.3059929-1-Jason@zx2c4.com
State New
Headers show
Series [v2] crypto: lib/chacha20poly1305 - define empty module exit function | expand

Commit Message

Jason A. Donenfeld Jan. 15, 2021, 7:30 p.m. UTC
With no mod_exit function, users are unable to unload the module after
use. I'm not aware of any reason why module unloading should be
prohibited for this one, so this commit simply adds an empty exit
function.

Reported-and-tested-by: John Donnelly <john.p.donnelly@oracle.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

---
v1->v2:
- Fix typo in commit message.

 lib/crypto/chacha20poly1305.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.30.0

Comments

John Donnelly Jan. 16, 2021, 12:28 a.m. UTC | #1
> On Jan 15, 2021, at 1:30 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> 

> With no mod_exit function, users are unable to unload the module after

> use. I'm not aware of any reason why module unloading should be

> prohibited for this one, so this commit simply adds an empty exit

> function.

> 

> Reported-and-tested-by: John Donnelly <john.p.donnelly@oracle.com>

> Acked-by: Ard Biesheuvel <ardb@kernel.org>

> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>


Thanks! 

Would someone be kind enough to remind when this appears and I will apply it to our product ? We like to use published commits when possible.

JD


> ---

> v1->v2:

> - Fix typo in commit message.

> 

> lib/crypto/chacha20poly1305.c | 5 +++++

> 1 file changed, 5 insertions(+)

> 

> diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c

> index 5850f3b87359..c2fcdb98cc02 100644

> --- a/lib/crypto/chacha20poly1305.c

> +++ b/lib/crypto/chacha20poly1305.c

> @@ -362,7 +362,12 @@ static int __init mod_init(void)

> 	return 0;

> }

> 

> +static void __exit mod_exit(void)

> +{

> +}

> +

> module_init(mod_init);

> +module_exit(mod_exit);

> MODULE_LICENSE("GPL v2");

> MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");

> MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>");

> -- 

> 2.30.0

>
Jason A. Donenfeld Jan. 16, 2021, 12:31 a.m. UTC | #2
On Sat, Jan 16, 2021 at 1:30 AM John Donnelly
<john.p.donnelly@oracle.com> wrote:
>

>

>

> > On Jan 15, 2021, at 1:30 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> >

> > With no mod_exit function, users are unable to unload the module after

> > use. I'm not aware of any reason why module unloading should be

> > prohibited for this one, so this commit simply adds an empty exit

> > function.

> >

> > Reported-and-tested-by: John Donnelly <john.p.donnelly@oracle.com>

> > Acked-by: Ard Biesheuvel <ardb@kernel.org>

> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

>

> Thanks!

>

> Would someone be kind enough to remind when this appears and I will apply it to our product ? We like to use published commits when possible.

>

> JD


It'll show up in one of these two repos in a week or two:
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git/
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/
Herbert Xu Jan. 22, 2021, 6:21 a.m. UTC | #3
On Fri, Jan 15, 2021 at 08:30:12PM +0100, Jason A. Donenfeld wrote:
> With no mod_exit function, users are unable to unload the module after

> use. I'm not aware of any reason why module unloading should be

> prohibited for this one, so this commit simply adds an empty exit

> function.

> 

> Reported-and-tested-by: John Donnelly <john.p.donnelly@oracle.com>

> Acked-by: Ard Biesheuvel <ardb@kernel.org>

> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

> ---

> v1->v2:

> - Fix typo in commit message.

> 

>  lib/crypto/chacha20poly1305.c | 5 +++++

>  1 file changed, 5 insertions(+)


Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff mbox series

Patch

diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c
index 5850f3b87359..c2fcdb98cc02 100644
--- a/lib/crypto/chacha20poly1305.c
+++ b/lib/crypto/chacha20poly1305.c
@@ -362,7 +362,12 @@  static int __init mod_init(void)
 	return 0;
 }
 
+static void __exit mod_exit(void)
+{
+}
+
 module_init(mod_init);
+module_exit(mod_exit);
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");
 MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>");