From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: peterz@infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, jgg@ziepe.ca, mingo@redhat.com,
jeffrin@rajagiritech.edu.in, linux-integrity@vger.kernel.org,
will@kernel.org, peterhuewe@gmx.de
Subject: Re: [PATCH] tpm: fix WARNING: lock held when returning to user space
Date: Wed, 11 Dec 2019 20:00:45 +0200 [thread overview]
Message-ID: <20191211180045.GN4516@linux.intel.com> (raw)
In-Reply-To: <20191211175119.GI4516@linux.intel.com>
On Wed, Dec 11, 2019 at 07:52:02PM +0200, Jarkko Sakkinen wrote:
> On Tue, Dec 10, 2019 at 01:17:51PM -0800, Tadeusz Struk wrote:
> > When an application sends TPM commands in NONBLOCKING mode
> > the driver holds chip->tpm_mutex returning from write(),
> > which triggers WARNING: lock held when returning to user space!
> > To silence this warning the driver needs to release the mutex
> > and acquire it again in tpm_dev_async_work() before sending
> > the command.
>
> This commit message is nonsense ATM. The code leaves locks held,
> which is unacceptable.
>
> Silencing warnings is worst possible rationale for a code change
> that I can think of starting from the fact that is straight out
> wrong and malicious.
The code change, however, seems to be doing the right thing.
Please bundle it with the test and fix the commit message
appropriately.
/Jarkko
next prev parent reply other threads:[~2019-12-11 18:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-07 17:34 [PROBLEM]: WARNING: lock held when returning to user space! (5.4.1 #16 Tainted: G ) Jeffrin Jose
2019-12-09 10:34 ` Will Deacon
2019-12-09 20:25 ` Jarkko Sakkinen
2019-12-09 21:34 ` Tadeusz Struk
2019-12-10 19:04 ` [PATCH] tpm: selftest: add test covering async mode Tadeusz Struk
2019-12-11 17:42 ` Jarkko Sakkinen
2019-12-10 21:17 ` [PATCH] tpm: fix WARNING: lock held when returning to user space Tadeusz Struk
2019-12-11 17:47 ` Jarkko Sakkinen
2019-12-11 17:52 ` Jarkko Sakkinen
2019-12-11 18:00 ` Jarkko Sakkinen [this message]
2019-12-11 15:17 ` [PROBLEM]: WARNING: lock held when returning to user space! (5.4.1 #16 Tainted: G ) Jeffrin Jose
2019-12-11 18:36 ` Tadeusz Struk
2019-12-12 8:12 ` Jeffrin Jose
2019-12-11 17:45 ` Jarkko Sakkinen
2019-12-11 18:18 ` Jeffrin Jose
2019-12-11 18:22 ` Jeffrin Jose
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=20191211180045.GN4516@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=jeffrin@rajagiritech.edu.in \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterhuewe@gmx.de \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=tadeusz.struk@intel.com \
--cc=will@kernel.org \
/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).