]> asedeno.scripts.mit.edu Git - linux.git/commit
tpm: Return the actual size when receiving an unsupported command
authorRicardo Schwarzmeier <Ricardo.Schwarzmeier@infineon.com>
Tue, 26 Jun 2018 15:31:45 +0000 (17:31 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sat, 28 Jul 2018 14:03:11 +0000 (17:03 +0300)
commit36a11029b07ee30bdc4553274d0efea645ed9d91
treea0905a4c425cd3c4ce19357b130783a24cc4c977
parent627448e85c766587f6fdde1ea3886d6615081c77
tpm: Return the actual size when receiving an unsupported command

The userpace expects to read the number of bytes stated in the header.
Returning the size of the buffer instead would be unexpected.

Cc: stable@vger.kernel.org
Fixes: 095531f891e6 ("tpm: return a TPM_RC_COMMAND_CODE response if command is not implemented")
Signed-off-by: Ricardo Schwarzmeier <Ricardo.Schwarzmeier@infineon.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm-interface.c