Skip to content
Commit d8d74ea3 authored by Stefan Berger's avatar Stefan Berger Committed by Jarkko Sakkinen
Browse files

tpm: ibmvtpm: Wait for buffer to be set before proceeding

Synchronize with the results from the CRQs before continuing with
the initialization. This avoids trying to send TPM commands while
the rtce buffer has not been allocated, yet.

This patch fixes an existing race condition that may occurr if the
hypervisor does not quickly respond to the VTPM_GET_RTCE_BUFFER_SIZE
request sent during initialization and therefore the ibmvtpm->rtce_buf
has not been allocated at the time the first TPM command is sent.

Fixes: 132f7629

 ("drivers/char/tpm: Add new device driver to support IBM vTPM")
Signed-off-by: default avatarStefan Berger <stefanb@linux.ibm.com>
Acked-by: default avatarNayna Jain <nayna@linux.ibm.com>
Tested-by: default avatarNayna Jain <nayna@linux.ibm.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 5cb2ace9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment