linux/drivers/char/tpm
Jarkko Sakkinen e08295290c tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
commit f4032d615f upstream.

/dev/vtpmx is made visible before 'workqueue' is initialized, which can
lead to a memory corruption in the worst case scenario.

Address this by initializing 'workqueue' as the very first step of the
driver initialization.

Cc: stable@vger.kernel.org
Fixes: 6f99612e25 ("tpm: Proxy driver for supporting multiple emulated TPMs")
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@tuni.fi>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-23 13:47:47 +02:00
..
eventlog tpm/eventlog: Don't abort tpm_read_log on faulty ACPI address 2023-03-17 08:48:59 +01:00
st33zp24 tpm/st33zp24: fix spelling mistake "drescription" -> "description" 2020-07-02 17:49:00 +03:00
Kconfig char: tpm: Kconfig: remove bad i2c cr50 select 2021-08-23 19:55:42 +03:00
Makefile char: tpm: add i2c driver for cr50 2021-02-16 10:40:27 +02:00
tpm1-cmd.c tpm: fix some doc warnings in tpm1-cmd.c 2021-06-23 16:51:03 +03:00
tpm2-cmd.c tpm: Fix buffer access in tpm2_get_tpm_pt() 2022-06-06 08:43:41 +02:00
tpm2-space.c tpm: fix reference counting for struct tpm_chip 2022-04-08 14:22:48 +02:00
tpm_atmel.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_atmel.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_crb.c tpm: tpm_crb: Add the missed acpi_put_table() to fix memory leak 2023-01-12 11:58:48 +01:00
tpm_ftpm_tee.c tpm/tpm_ftpm_tee: Fix error handling in ftpm_mod_init() 2022-12-31 13:14:00 +01:00
tpm_ftpm_tee.h tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE 2019-09-02 17:08:35 +03:00
tpm_i2c_atmel.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
tpm_i2c_infineon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_i2c_nuvoton.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
tpm_ibmvtpm.c tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() 2022-06-06 08:43:41 +02:00
tpm_ibmvtpm.h tpm: ibmvtpm: Avoid error message when process gets signal while waiting 2021-08-23 19:55:42 +03:00
tpm_infineon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_nsc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_ppi.c tpm/ppi: Constify static struct attribute_group 2021-02-16 10:40:27 +02:00
tpm_tis_core.c tpm, tpm_tis: Claim locality in interrupt handler 2023-06-28 10:29:40 +02:00
tpm_tis_core.h tpm, tpm: Implement usage counter for locality 2023-05-11 23:00:19 +09:00
tpm_tis_i2c_cr50.c char: tpm: cr50_i2c: Suppress duplicated error message in .remove() 2022-06-09 10:22:40 +02:00
tpm_tis_spi_cr50.c tpm: tpm_tis_spi_cr50: use new structure for SPI transfer delays 2020-03-13 03:53:16 +02:00
tpm_tis_spi_main.c tpm_tis_spi: Add missing SPI ID 2021-11-18 19:16:41 +01:00
tpm_tis_spi.h tpm: tpm_tis_spi: Support cr50 devices 2019-11-12 21:45:37 +02:00
tpm_tis_synquacer.c tpm: tis: add support for MMIO TPM on SynQuacer 2020-10-02 00:21:02 +03:00
tpm_tis.c tpm/tpm_tis: Disable interrupts for more Lenovo devices 2023-05-24 17:36:55 +01:00
tpm_vtpm_proxy.c tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation 2023-07-23 13:47:47 +02:00
tpm-chip.c tpm: fix reference counting for struct tpm_chip 2022-04-08 14:22:48 +02:00
tpm-dev-common.c tpm: Fix error handling in async work 2022-03-28 09:58:42 +02:00
tpm-dev.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm-dev.h tpm: Handle negative priv->response_len in tpm_common_read() 2020-01-08 18:11:09 +02:00
tpm-interface.c char: tpm: Protect tpm_pm_suspend with locks 2022-12-08 11:28:45 +01:00
tpm-sysfs.c tpm: add sysfs exports for all banks of PCR registers 2021-02-16 10:40:27 +02:00
tpm.h tpm: fix reference counting for struct tpm_chip 2022-04-08 14:22:48 +02:00
tpmrm-dev.c tpm: Unify the mismatching TPM space buffer sizes 2020-07-24 09:26:23 +03:00
xen-tpmfront.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00