stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: stable@vger.kernel.org
Cc: Yue Haibing <yuehaibing@huawei.com>,
	James Morris <james.morris@microsoft.com>
Subject: Re: [PATCH v2] tpm: Fix the type of the return value in calc_tpm2_event_size()
Date: Tue, 23 Apr 2019 17:57:14 +0300	[thread overview]
Message-ID: <20190423145714.GA30090@linux.intel.com> (raw)
In-Reply-To: <20190423125816.17558-1-jarkko.sakkinen@linux.intel.com>

On Tue, Apr 23, 2019 at 03:58:16PM +0300, Jarkko Sakkinen wrote:
> From: Yue Haibing <yuehaibing@huawei.com>
> 
> calc_tpm2_event_size() has an invalid signature because
> it returns a 'size_t' where as its signature says that
> it returns 'int'.
> 
> Cc: <stable@vger.kernel.org>
> Fixes: 4d23cc323cdb ("tpm: add securityfs support for TPM 2.0 firmware event log")
> Suggested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Signed-off-by: James Morris <james.morris@microsoft.com>
> ---
> backport v5.0.8
> fixed compilation issue
>  drivers/char/tpm/eventlog/tpm2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/tpm/eventlog/tpm2.c b/drivers/char/tpm/eventlog/tpm2.c
> index d8b77133a83a..f824563fc28d 100644
> --- a/drivers/char/tpm/eventlog/tpm2.c
> +++ b/drivers/char/tpm/eventlog/tpm2.c
> @@ -37,8 +37,8 @@
>   *
>   * Returns size of the event. If it is an invalid event, returns 0.
>   */
> -static int calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
> -				struct tcg_pcr_event *event_header)
> +static size_t calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
> +				   struct tcg_pcr_event *event_header)
>  {
>  	struct tcg_efi_specid_event_head *efispecid;
>  	struct tcg_event_field *event_field;
> -- 
> 2.20.1
> 

This was a mistake. Please ignore. Sent another one.

/Jarkko

  reply	other threads:[~2019-04-23 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 12:58 [PATCH v2] tpm: Fix the type of the return value in calc_tpm2_event_size() Jarkko Sakkinen
2019-04-23 14:57 ` Jarkko Sakkinen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-04-23 13:05 Jarkko Sakkinen
2019-04-23 15:05 ` Sasha Levin

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=20190423145714.GA30090@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=james.morris@microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).