diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-04-25 10:25:02 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-04-25 10:25:02 +0200 |
commit | 9d577f19fe225639ef041d1bf54a7e9ad6a05296 (patch) | |
tree | 121aa12245bacdb9c5c203ab59ca371407b95617 /crypto/rng.c | |
parent | 577ef62b7c7c672f6632626daa2e83fc2018aa26 (diff) | |
parent | 3278a1722acf54316ac94db3f3a83aed32857edc (diff) | |
download | linux-crypto-9d577f19fe225639ef041d1bf54a7e9ad6a05296.tar.gz linux-crypto-9d577f19fe225639ef041d1bf54a7e9ad6a05296.zip |
Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core
Pull EFI changes for v5.8 from Ard Biesheuvel:
"- preliminary changes for RISC-V
- add support for setting the resolution on the EFI framebuffer
- simplify kernel image loading for arm64
- Move .bss into .data via the linker script instead of relying on symbol
annotations.
- Get rid of __pure getters to access global variables
- Clean up the config table matching arrays"
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'crypto/rng.c')
-rw-r--r-- | crypto/rng.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/rng.c b/crypto/rng.c index 1e21231f..1490d210 100644 --- a/crypto/rng.c +++ b/crypto/rng.c @@ -37,12 +37,16 @@ int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) crypto_stats_get(alg); if (!seed && slen) { buf = kmalloc(slen, GFP_KERNEL); - if (!buf) + if (!buf) { + crypto_alg_put(alg); return -ENOMEM; + } err = get_random_bytes_wait(buf, slen); - if (err) + if (err) { + crypto_alg_put(alg); goto out; + } seed = buf; } |