diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2019-12-12 09:48:47 -0800 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2019-12-17 12:20:04 +0200 |
commit | d23d12484307b40eea549b8a858f5fffad913897 (patch) | |
tree | 40e278f20d0effbf43f8065b617459067e3a1c21 /tools/testing | |
parent | 45477b3fe3d10376b649b1b85fce72b2f9f1da84 (diff) | |
download | linux-d23d12484307b40eea549b8a858f5fffad913897.tar.bz2 |
tpm: fix invalid locking in NONBLOCKING mode
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 fix this issue the driver needs to release the mutex before
returning and acquire it again in tpm_dev_async_work() before
sending the command.
Cc: stable@vger.kernel.org
Fixes: 9e1b74a63f776 (tpm: add support for nonblocking operation)
Reported-by: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
Tested-by: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions