tpm: Avoid error message when process gets signal while waiting and other upstream fixes
Bugzilla: http://bugzilla.redhat.com/1983089
Upstream Status: merged into the linux.git
When rngd is run as root then lots of these types of message will appear
in the kernel log if the TPM has been configured to provide random bytes:
[ 7406.275163] tpm tpm0: tpm_transmit: tpm_recv: error -4
The issue is caused by the following call that is interrupted while
waiting for the TPM's response.
sig = wait_event_interruptible(ibmvtpm->wq, !ibmvtpm->tpm_processing_cmd);
Rather than waiting for the response in the low level driver, have it use
the polling loop in tpm_try_transmit().
Include also other fixes for TPM from upstream.
All commits apply cleanly, no change from the upstream.
Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
Edited by Prarit Bhargava