Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/27933
Change subject: security/tpm: Check for NULL pointer ......................................................................
security/tpm: Check for NULL pointer
Change bce49c2 missed checking for NULL pointer before accessing the tcpa_table returned by tcpa_log_init. This change fixes the boot hang observed on octopus by ensuring pointer is checked for NULL before using it.
BUG=b:111403731 TEST=Verified that octopus boots up fine.
Change-Id: I2e46197065f8db1dc028a85551546263e60d46b2 Signed-off-by: Furquan Shaikh furquan@google.com --- M src/security/tpm/tspi/log.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/27933/1
diff --git a/src/security/tpm/tspi/log.c b/src/security/tpm/tspi/log.c index 0a6655a..17f6f1f 100644 --- a/src/security/tpm/tspi/log.c +++ b/src/security/tpm/tspi/log.c @@ -57,6 +57,10 @@ struct tcpa_entry *tce;
tclt = tcpa_log_init(); + + if (!tclt) + return; + if (tclt->num_entries == tclt->max_entries) { printk(BIOS_WARNING, "ERROR: TCPA log table is full\n"); return;