From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Vasily Averin <vvs@virtuozzo.com>
Cc: linux-integrity@vger.kernel.org, Peter Huewe <peterhuewe@gmx.de>,
Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH] tpm_tis: extra chip->ops check on error path in tpm_tis_core_init
Date: Wed, 17 Jun 2020 05:10:29 +0300 [thread overview]
Message-ID: <20200617021029.GC7215@linux.intel.com> (raw)
In-Reply-To: <8d6e3656-1662-dc71-8876-c7f0f11a11b1@virtuozzo.com>
On Sat, Jun 13, 2020 at 05:18:33PM +0300, Vasily Averin wrote:
> Found by smatch:
> drivers/char/tpm/tpm_tis_core.c:1088 tpm_tis_core_init() warn:
> variable dereferenced before check 'chip->ops' (see line 979)
>
> 'chip->ops' is assigned in the beginning of function
> in tpmm_chip_alloc->tpm_chip_alloc
> and is used before first possible goto to error path.
>
> Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarkko
next prev parent reply other threads:[~2020-06-17 2:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-13 14:18 [PATCH] tpm_tis: extra chip->ops check on error path in tpm_tis_core_init Vasily Averin
2020-06-17 2:10 ` Jarkko Sakkinen [this message]
2020-06-17 2:26 ` Jerry Snitselaar
2020-06-17 23:29 ` Jarkko Sakkinen
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=20200617021029.GC7215@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=vvs@virtuozzo.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).