]> git.ipfire.org Git - people/ms/linux.git/commit
TPM: chip disabled state erronously being reported as error
authorRajiv Andrade <srajiv@linux.vnet.ibm.com>
Tue, 24 Apr 2012 20:38:17 +0000 (17:38 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:22:51 +0000 (08:22 -0700)
commit7d9c864282b93edf60959aac2320cf8166aa0202
tree11ea15103b9479003f50d06f0c49a7322b9f0eb6
parent87f2dfbf9bfd65659c2ac4ae68ad19d6ed569b6d
TPM: chip disabled state erronously being reported as error

commit 24ebe6670de3d1f0dca11c9eb372134c7ab05503 upstream.

tpm_do_selftest() attempts to read a PCR in order to
decide if one can rely on the TPM being used or not.
The function that's used by __tpm_pcr_read() does not
expect the TPM to be disabled or deactivated, and if so,
reports an error.

It's fine if the TPM returns this error when trying to
use it for the first time after a power cycle, but it's
definitely not if it already returned success for a
previous attempt to read one of its PCRs.

The tpm_do_selftest() was modified so that the driver only
reports this return code as an error when it really is.

Reported-and-tested-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm.c