History

KEYS: trusted: Fix TPM reservation for seal/unseal

The original patch 8c657a0590de ("KEYS: trusted: Reserve TPM for seal and unseal operations") was correct on the mailing list: https://lore.kernel.org/linux-integrity/20210128235621.127925-4-jarkko@kernel.org/ But somehow got rebased so that the tpm_try_get_ops() in tpm2_seal_trusted() got lost. This causes an imbalanced put of the TPM ops and causes oopses on TIS based hardware. This fix puts back the lost tpm_try_get_ops()

James Bottomley committed 5 years ago

Commit 9d5171e1 parent bf05bf11 file · +1 −1Browse files

Unified · Split

security/keys/trusted-keys/trusted_tpm2.c+1−1
@@ -79,7 +79,7 @@ int tpm2_seal_trusted(struct tpm_chip *chip, · 78 unmodified lines
79 if (i == ARRAY_SIZE(tpm2_hash_map))79 if (i == ARRAY_SIZE(tpm2_hash_map))
80 return -EINVAL;80 return -EINVAL;
81 81
82 rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_CREATE);82 rc = tpm_try_get_ops(chip);
83 if (rc)83 if (rc)
84 return rc;84 return rc;
85 85

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t