kernel_samsung_a53x/drivers/char/tpm
Jonathan McDowell 59571294fa tpm: Clean up TPM space after command failure
[ Upstream commit e3aaebcbb7c6b403416f442d1de70d437ce313a7 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:22 +01:00
..
eventlog char: tpm: Fix possible memory leak in tpm_bios_measurements_open() 2024-11-23 23:20:12 +01:00
st33zp24 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm-chip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm-dev-common.c tpm: Clean up TPM space after command failure 2024-11-23 23:21:22 +01:00
tpm-dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm-dev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm-interface.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm-sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm1-cmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm2-cmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm2-space.c tpm: Clean up TPM space after command failure 2024-11-23 23:21:22 +01:00
tpm_atmel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_atmel.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_crb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_ftpm_tee.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_ftpm_tee.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_i2c_atmel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_i2c_infineon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_i2c_nuvoton.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_ibmvtpm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_ibmvtpm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_infineon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_nsc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_ppi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_tis.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_tis_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_tis_core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_tis_spi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_tis_spi_cr50.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_tis_spi_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_tis_synquacer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm_vtpm_proxy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpmrm-dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-tpmfront.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00