crypto: ccree - account for TEE not ready to report
authorGilad Ben-Yossef <gilad@benyossef.com>
Tue, 2 Jul 2019 11:39:19 +0000 (14:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2019 16:20:54 +0000 (18:20 +0200)
commitf5c087a0d9a0e31b4a97ebba3b5eb263f1a6c24f
treebcec56761a745cb88ed69742e27cef44c5098de1
parent561bf9309209e174035eaee0edfc3247ecfdff76
crypto: ccree - account for TEE not ready to report

commit 76a95bd8f9e10cade9c4c8df93b5c20ff45dc0f5 upstream.

When ccree driver runs it checks the state of the Trusted Execution
Environment CryptoCell driver before proceeding. We did not account
for cases where the TEE side is not ready or not available at all.
Fix it by only considering TEE error state after sync with the TEE
side driver.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Fixes: ab8ec9658f5a ("crypto: ccree - add FIPS support")
CC: stable@vger.kernel.org # v4.17+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccree/cc_fips.c