From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-integrity@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
Mario Limonciello <mario.limonciello@dell.com>,
Alex Guzman <alex@guzman.io>
Subject: Re: [PATCH v2] tpm: fix TIS locality timeout problems
Date: Thu, 28 May 2020 22:10:18 +0300 [thread overview]
Message-ID: <20200528191018.GB2147934@linux.intel.com> (raw)
In-Reply-To: <1590689457.3449.7.camel@HansenPartnership.com>
On Thu, May 28, 2020 at 11:10:57AM -0700, James Bottomley wrote:
> It has been reported that some TIS based TPMs are giving unexpected
> errors when using the O_NONBLOCK path of the TPM device. The problem
> is that some TPMs don't like it when you get and then relinquish a
> locality (as the tpm_try_get_ops()/tpm_put_ops() pair does) without
> sending a command. This currently happens all the time in the
> O_NONBLOCK write path. Fix this by moving the tpm_try_get_ops()
> further down the code to after the O_NONBLOCK determination is made.
> This is safe because the priv->buffer_mutex still protects the priv
> state being modified.
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206275
> Fixes: d23d12484307 ("tpm: fix invalid locking in NONBLOCKING mode")
> Reported-by: Mario Limonciello <Mario.Limonciello@dell.com>
> Tested-by: Alex Guzman <alex@guzman.io>
> Cc: stable@vger.kernel.org
> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Thanks a lot! Merging this soon.
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarko
prev parent reply other threads:[~2020-05-28 19:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 18:10 [PATCH v2] tpm: fix TIS locality timeout problems James Bottomley
2020-05-28 19:10 ` Jarkko Sakkinen [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=20200528191018.GB2147934@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alex@guzman.io \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=mario.limonciello@dell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.