Skip to content
Commit 7cd46930 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen Committed by Greg Kroah-Hartman
Browse files

tpm: Prevent hwrng from activating during resume



[ Upstream commit 99d46450 ]

Set TPM_CHIP_FLAG_SUSPENDED in tpm_pm_suspend() and reset in
tpm_pm_resume(). While the flag is set, tpm_hwrng() gives back zero
bytes. This prevents hwrng from racing during resume.

Cc: stable@vger.kernel.org
Fixes: 6e592a06 ("tpm: Move Linux RNG connection to hwrng")
Reviewed-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 25d38d5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment