Skip to content

Commit

Permalink
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "This fixes a regression that breaks the jitterentropy RNG and a
  potential memory leak in hmac"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: hmac - fix memory leak in hmac_init_tfm()
  crypto: jitterentropy - change back to module_init()
  • Loading branch information
torvalds committed Jun 6, 2019
2 parents 0104763 + 7829a0c commit ae87660
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crypto/hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ static int hmac_init_tfm(struct crypto_tfm *tfm)

parent->descsize = sizeof(struct shash_desc) +
crypto_shash_descsize(hash);
if (WARN_ON(parent->descsize > HASH_MAX_DESCSIZE))
if (WARN_ON(parent->descsize > HASH_MAX_DESCSIZE)) {
crypto_free_shash(hash);
return -EINVAL;
}

ctx->hash = hash;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion crypto/jitterentropy-kcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static void __exit jent_mod_exit(void)
crypto_unregister_rng(&jent_alg);
}

subsys_initcall(jent_mod_init);
module_init(jent_mod_init);
module_exit(jent_mod_exit);

MODULE_LICENSE("Dual BSD/GPL");
Expand Down

0 comments on commit ae87660

Please sign in to comment.