linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] tpm: Put the TCPA table buf after using it
@ 2020-07-17 11:45 Hanjun Guo
  2020-07-17 11:45 ` [PATCH 2/3] tpm: tpm_crb: Put the TPM2 table " Hanjun Guo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Hanjun Guo @ 2020-07-17 11:45 UTC (permalink / raw)
  To: Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe; +Cc: linux-integrity, Hanjun Guo

The acpi_get_table() should be coupled with acpi_put_table() if
the mapped table is not used for runtime to release the table
mapping, put the TCPA table buf after using it.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
 drivers/char/tpm/eventlog/acpi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/char/tpm/eventlog/acpi.c b/drivers/char/tpm/eventlog/acpi.c
index 63ada5e..e8ac30b 100644
--- a/drivers/char/tpm/eventlog/acpi.c
+++ b/drivers/char/tpm/eventlog/acpi.c
@@ -79,6 +79,9 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
 		start = buff->client.log_start_addr;
 		break;
 	}
+
+	acpi_put_table((struct acpi_table_header *)buff);
+
 	if (!len) {
 		dev_warn(&chip->dev, "%s: TCPA log area empty\n", __func__);
 		return -EIO;
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-23  3:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17 11:45 [PATCH 1/3] tpm: Put the TCPA table buf after using it Hanjun Guo
2020-07-17 11:45 ` [PATCH 2/3] tpm: tpm_crb: Put the TPM2 table " Hanjun Guo
2020-07-17 11:45 ` [PATCH 3/3] tpm: tpm_tis: " Hanjun Guo
2020-07-23  3:21 ` [PATCH 1/3] tpm: Put the TCPA table buf " Jarkko Sakkinen
2020-07-23  3:43   ` Hanjun Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).