<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27933">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">security/tpm: Check for NULL pointer<br><br>Change bce49c2 missed checking for NULL pointer before accessing the<br>tcpa_table returned by tcpa_log_init. This change fixes the boot hang<br>observed on octopus by ensuring pointer is checked for NULL before<br>using it.<br><br>BUG=b:111403731<br>TEST=Verified that octopus boots up fine.<br><br>Change-Id: I2e46197065f8db1dc028a85551546263e60d46b2<br>Signed-off-by: Furquan Shaikh <furquan@google.com><br>---<br>M src/security/tpm/tspi/log.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/27933/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/security/tpm/tspi/log.c b/src/security/tpm/tspi/log.c</span><br><span>index 0a6655a..17f6f1f 100644</span><br><span>--- a/src/security/tpm/tspi/log.c</span><br><span>+++ b/src/security/tpm/tspi/log.c</span><br><span>@@ -57,6 +57,10 @@</span><br><span>         struct tcpa_entry *tce;</span><br><span> </span><br><span>  tclt = tcpa_log_init();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     if (!tclt)</span><br><span style="color: hsl(120, 100%, 40%);">+            return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    if (tclt->num_entries == tclt->max_entries) {</span><br><span>          printk(BIOS_WARNING, "ERROR: TCPA log table is full\n");</span><br><span>           return;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27933">change 27933</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/27933"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I2e46197065f8db1dc028a85551546263e60d46b2 </div>
<div style="display:none"> Gerrit-Change-Number: 27933 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>