linux-imx/drivers/char/tpm
Joe Hattori 2b1aec0e6c char: tpm: Fix possible memory leak in tpm_bios_measurements_open()
commit 5d8e2971e8 upstream.

In tpm_bios_measurements_open(), get_device() is called on the device
embedded in struct tpm_chip. In the error path, however, put_device() is
not called. This results in a reference count leak, which prevents the
device from being properly released. This commit makes sure to call
put_device() when the seq_open() call fails.

Cc: stable@vger.kernel.org # +v4.18
Fixes: 9b01b53566 ("tpm: Move shared eventlog functions to common.c")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-03 08:54:14 +02:00
..
eventlog char: tpm: Fix possible memory leak in tpm_bios_measurements_open() 2024-08-03 08:54:14 +02:00
st33zp24 tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
Kconfig
Makefile
tpm_atmel.c
tpm_atmel.h tpm: atmel: Add explicit include for of.h 2023-04-06 20:36:27 +02:00
tpm_crb.c tpm: Enable hwrng only for Pluton on AMD CPUs 2023-09-04 21:57:59 +03:00
tpm_ftpm_tee.c tpm: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
tpm_ftpm_tee.h
tpm_i2c_atmel.c tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
tpm_i2c_infineon.c tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
tpm_i2c_nuvoton.c tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
tpm_ibmvtpm.c
tpm_ibmvtpm.h
tpm_infineon.c
tpm_nsc.c
tpm_ppi.c
tpm_tis_core.c tpm_tis: Do *not* flush uninitialized work 2024-06-16 13:47:41 +02:00
tpm_tis_core.h tpm_tis: Use responseRetry to recover from data transfer errors 2023-08-17 20:12:41 +00:00
tpm_tis_i2c_cr50.c tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
tpm_tis_i2c.c tpm: Switch i2c drivers back to use .probe() 2023-07-28 18:12:40 +00:00
tpm_tis_spi_cr50.c
tpm_tis_spi_main.c tpm_tis_spi: Account for SPI header when allocating TPM SPI xfer buffer 2024-06-12 11:12:51 +02:00
tpm_tis_spi.h
tpm_tis_synquacer.c Devicetree include cleanups for v6.6: 2023-08-30 17:04:28 -07:00
tpm_tis.c Devicetree include cleanups for v6.6: 2023-08-30 17:04:28 -07:00
tpm_vtpm_proxy.c tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation 2023-07-17 19:32:30 +00:00
tpm-chip.c tpm: Fix typo in tpmrm class definition 2023-09-12 23:07:37 +03:00
tpm-dev-common.c timers: Get rid of del_singleshot_timer_sync() 2022-11-24 15:09:10 +01:00
tpm-dev.c
tpm-dev.h
tpm-interface.c tpm: make all 'class' structures const 2023-08-05 08:31:41 +02:00
tpm-sysfs.c
tpm.h tpm: make all 'class' structures const 2023-08-05 08:31:41 +02:00
tpm1-cmd.c
tpm2-cmd.c tpm: add vendor flag to command code validation 2023-02-13 10:11:20 +02:00
tpm2-space.c tpm: make all 'class' structures const 2023-08-05 08:31:41 +02:00
tpmrm-dev.c
xen-tpmfront.c xen: make remove callback of xen driver void returned 2022-12-15 16:06:10 +01:00