]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
tpm: fix wrong return value in tpm_pcr_extend
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Tue, 14 Apr 2020 11:42:26 +0000 (19:42 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 25 May 2020 08:41:50 +0000 (10:41 +0200)
commitbb3bbb48b1ed63c2bd1192ea6fd88cd489c7103a
tree4ff9b94830c1d73c74d4b05ad55e7f190fb3f65d
parentccd86691b9ef37a5bf69fae1d65d3fafd24c2bfc
tpm: fix wrong return value in tpm_pcr_extend

BugLink: https://bugs.launchpad.net/bugs/1876361
commit 29cb79795e324a8b65e7891d76f8f6ca911ba440 upstream.

For the algorithm that does not match the bank, a positive
value EINVAL is returned here. I think this is a typo error.
It is necessary to return an error value.

Cc: stable@vger.kernel.org # 5.4.x
Fixes: 9f75c8224631 ("KEYS: trusted: correctly initialize digests and fix locking issue")
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/char/tpm/tpm-interface.c