diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-13 21:46:24 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-13 21:46:24 +0300 |
commit | ee1c7bd33e66376067fd6306b730789ee2ae53e4 (patch) | |
tree | 5e41e3644225ad523dbdaf0b94cb4685be8f8d0b | |
parent | 60a8db790255a6bebcdc41d97e8084a440398206 (diff) | |
parent | 2d6c25215ab26bb009de3575faab7b685f138e92 (diff) | |
download | linux-ee1c7bd33e66376067fd6306b730789ee2ae53e4.tar.xz |
Merge tag 'tpmdd-next-20190813' of git://git.infradead.org/users/jjs/linux-tpmdd
Pull tpm fixes from Jarkko Sakkinen:
"One more bug fix for the next release"
* tag 'tpmdd-next-20190813' of git://git.infradead.org/users/jjs/linux-tpmdd:
KEYS: trusted: allow module init if TPM is inactive or deactivated
-rw-r--r-- | security/keys/trusted.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/security/keys/trusted.c b/security/keys/trusted.c index 9a94672e7adc..ade699131065 100644 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c @@ -1228,24 +1228,11 @@ hashalg_fail: static int __init init_digests(void) { - u8 digest[TPM_MAX_DIGEST_SIZE]; - int ret; - int i; - - ret = tpm_get_random(chip, digest, TPM_MAX_DIGEST_SIZE); - if (ret < 0) - return ret; - if (ret < TPM_MAX_DIGEST_SIZE) - return -EFAULT; - digests = kcalloc(chip->nr_allocated_banks, sizeof(*digests), GFP_KERNEL); if (!digests) return -ENOMEM; - for (i = 0; i < chip->nr_allocated_banks; i++) - memcpy(digests[i].digest, digest, TPM_MAX_DIGEST_SIZE); - return 0; } |