Commit e3aaebcb authored by Jonathan McDowell's avatar Jonathan McDowell Committed by Jarkko Sakkinen
Browse files

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: 745b361e ("tpm: infrastructure for TPM spaces")
Signed-off-by: default avatarJonathan McDowell <noodles@meta.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent 2f27fce6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment