diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-10-05 17:49:46 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-10-12 01:42:58 +0200 |
commit | 197173db990cad244221ba73c43b1df6170ae278 (patch) | |
tree | b3a91c349a525ec3f660ecfc19bf9372e9cbb016 /block/blk-crypto-fallback.c | |
parent | treewide: use get_random_u32() when possible (diff) | |
download | linux-197173db990cad244221ba73c43b1df6170ae278.tar.xz linux-197173db990cad244221ba73c43b1df6170ae278.zip |
treewide: use get_random_bytes() when possible
The prandom_bytes() function has been a deprecated inline wrapper around
get_random_bytes() for several releases now, and compiles down to the
exact same code. Replace the deprecated wrapper with a direct call to
the real function. This was done as a basic find and replace.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> # powerpc
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'block/blk-crypto-fallback.c')
-rw-r--r-- | block/blk-crypto-fallback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index 621abd1b0e4d..ad9844c5b40c 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -539,7 +539,7 @@ static int blk_crypto_fallback_init(void) if (blk_crypto_fallback_inited) return 0; - prandom_bytes(blank_key, BLK_CRYPTO_MAX_KEY_SIZE); + get_random_bytes(blank_key, BLK_CRYPTO_MAX_KEY_SIZE); err = bioset_init(&crypto_bio_split, 64, 0, 0); if (err) |