.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Cryptographic API. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2017-present, Facebook, Inc. |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms of the GNU General Public License version 2 as published by |
---|
8 | | - * the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
13 | | - * more details. |
---|
14 | 6 | */ |
---|
15 | 7 | #include <linux/crypto.h> |
---|
16 | 8 | #include <linux/init.h> |
---|
.. | .. |
---|
145 | 137 | static void zstd_free_ctx(struct crypto_scomp *tfm, void *ctx) |
---|
146 | 138 | { |
---|
147 | 139 | __zstd_exit(ctx); |
---|
148 | | - kzfree(ctx); |
---|
| 140 | + kfree_sensitive(ctx); |
---|
149 | 141 | } |
---|
150 | 142 | |
---|
151 | 143 | static void zstd_exit(struct crypto_tfm *tfm) |
---|
.. | .. |
---|
214 | 206 | |
---|
215 | 207 | static struct crypto_alg alg = { |
---|
216 | 208 | .cra_name = "zstd", |
---|
| 209 | + .cra_driver_name = "zstd-generic", |
---|
217 | 210 | .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, |
---|
218 | 211 | .cra_ctxsize = sizeof(struct zstd_ctx), |
---|
219 | 212 | .cra_module = THIS_MODULE, |
---|
.. | .. |
---|
257 | 250 | crypto_unregister_scomp(&scomp); |
---|
258 | 251 | } |
---|
259 | 252 | |
---|
260 | | -module_init(zstd_mod_init); |
---|
| 253 | +subsys_initcall(zstd_mod_init); |
---|
261 | 254 | module_exit(zstd_mod_fini); |
---|
262 | 255 | |
---|
263 | 256 | MODULE_LICENSE("GPL"); |
---|