diff options
author | Jonathan McDowell <noodles@meta.com> | 2024-08-16 12:55:46 +0100 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2024-09-17 18:56:36 +0300 |
commit | e3aaebcbb7c6b403416f442d1de70d437ce313a7 (patch) | |
tree | a005f173c57a2ba62ba11126835170a11953feb0 /rust/helpers.c | |
parent | 2f27fce67173bbb05d5a0ee03dae5c021202c912 (diff) |
tpm: Clean up TPM space after command failure
tpm_dev_transmit prepares the TPM space before attempting command
transmission. However if the command fails no rollback of this
preparation is done. This can result in transient handles being leaked
if the device is subsequently closed with no further commands performed.
Fix this by flushing the space in the event of command transmission
failure.
Fixes: 745b361e989a ("tpm: infrastructure for TPM spaces")
Signed-off-by: Jonathan McDowell <noodles@meta.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions