hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/crypto/deflate.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Cryptographic API.
34 *
....@@ -5,11 +6,6 @@
56 * by IPCOMP (RFC 3173 & RFC 2394).
67 *
78 * Copyright (c) 2003 James Morris <jmorris@intercode.com.au>
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License as published by the Free
11
- * Software Foundation; either version 2 of the License, or (at your option)
12
- * any later version.
139 *
1410 * FIXME: deflate transforms will require up to a total of about 436k of kernel
1511 * memory on i386 (390k for compression, the rest for decompression), as the
....@@ -167,7 +163,7 @@
167163 static void deflate_free_ctx(struct crypto_scomp *tfm, void *ctx)
168164 {
169165 __deflate_exit(ctx);
170
- kzfree(ctx);
166
+ kfree_sensitive(ctx);
171167 }
172168
173169 static void deflate_exit(struct crypto_tfm *tfm)
....@@ -279,6 +275,7 @@
279275
280276 static struct crypto_alg alg = {
281277 .cra_name = "deflate",
278
+ .cra_driver_name = "deflate-generic",
282279 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
283280 .cra_ctxsize = sizeof(struct deflate_ctx),
284281 .cra_module = THIS_MODULE,
....@@ -334,7 +331,7 @@
334331 crypto_unregister_scomps(scomp, ARRAY_SIZE(scomp));
335332 }
336333
337
-module_init(deflate_mod_init);
334
+subsys_initcall(deflate_mod_init);
338335 module_exit(deflate_mod_fini);
339336
340337 MODULE_LICENSE("GPL");