From: Eric Biggers Date: Thu, 26 Mar 2026 00:15:00 +0000 (-0700) Subject: crypto: geniv - Use crypto_stdrng_get_bytes() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7373a6ba57e13999af590703b63071e4f13d652;p=thirdparty%2Fkernel%2Flinux.git crypto: geniv - Use crypto_stdrng_get_bytes() Replace the sequence of crypto_get_default_rng(), crypto_rng_get_bytes(), and crypto_put_default_rng() with the equivalent helper function crypto_stdrng_get_bytes(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu --- diff --git a/crypto/geniv.c b/crypto/geniv.c index 42eff6a7387c1..c619a5ad2fc18 100644 --- a/crypto/geniv.c +++ b/crypto/geniv.c @@ -114,13 +114,7 @@ int aead_init_geniv(struct crypto_aead *aead) spin_lock_init(&ctx->lock); - err = crypto_get_default_rng(); - if (err) - goto out; - - err = crypto_rng_get_bytes(crypto_default_rng, ctx->salt, - crypto_aead_ivsize(aead)); - crypto_put_default_rng(); + err = crypto_stdrng_get_bytes(ctx->salt, crypto_aead_ivsize(aead)); if (err) goto out;