From: Jerry Snitselaar <jsnitsel@redhat.com>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Cc: peterhuewe@gmx.de, jarkko.sakkinen@linux.intel.com, jgg@ziepe.ca,
arnd@arndb.de, gregkh@linuxfoundation.org,
zhang.jia@linux.alibaba.com, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: fix wrong return value in tpm_pcr_extend
Date: Tue, 14 Apr 2020 13:26:37 -0700 [thread overview]
Message-ID: <20200414202637.bsr3yccjq6mpflmp@cantor> (raw)
In-Reply-To: <20200414114226.96691-1-tianjia.zhang@linux.alibaba.com>
On Tue Apr 14 20, Tianjia Zhang wrote:
>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.
>
>Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
>---
> drivers/char/tpm/tpm-interface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
>index a438b1206fcb..1621ce818705 100644
>--- a/drivers/char/tpm/tpm-interface.c
>+++ b/drivers/char/tpm/tpm-interface.c
>@@ -323,7 +323,7 @@ int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
>
> for (i = 0; i < chip->nr_allocated_banks; i++) {
> if (digests[i].alg_id != chip->allocated_banks[i].alg_id) {
>- rc = EINVAL;
>+ rc = -EINVAL;
> goto out;
> }
> }
>--
>2.17.1
>
prev parent reply other threads:[~2020-04-14 20:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 11:42 [PATCH] tpm: fix wrong return value in tpm_pcr_extend Tianjia Zhang
2020-04-14 11:55 ` Roberto Sassu
2020-04-14 19:35 ` Jarkko Sakkinen
2020-04-14 20:26 ` Jerry Snitselaar
2020-04-16 16:11 ` Jarkko Sakkinen
2020-04-14 20:26 ` Jerry Snitselaar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200414202637.bsr3yccjq6mpflmp@cantor \
--to=jsnitsel@redhat.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=tianjia.zhang@linux.alibaba.com \
--cc=zhang.jia@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox