mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 17:28:39 +07:00
tpm: vtpm_proxy: Avoid reading host log when using a virtual device
commit 9716ac65efc8f780549b03bddf41e60c445d4709 upstream.
Avoid allocating memory and reading the host log when a virtual device
is used since this log is of no use to that driver. A virtual
device can be identified through the flag TPM_CHIP_FLAG_VIRTUAL, which
is only set for the tpm_vtpm_proxy driver.
Cc: stable@vger.kernel.org
Fixes: 6f99612e25
("tpm: Proxy driver for supporting multiple emulated TPMs")
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
60a01ecc9f
commit
c9adb76c71
@ -107,6 +107,9 @@ void tpm_bios_log_setup(struct tpm_chip *chip)
|
||||
int log_version;
|
||||
int rc = 0;
|
||||
|
||||
if (chip->flags & TPM_CHIP_FLAG_VIRTUAL)
|
||||
return;
|
||||
|
||||
rc = tpm_read_log(chip);
|
||||
if (rc < 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user