Skip to content
Commit d23d1248 authored by Tadeusz Struk's avatar Tadeusz Struk Committed by Jarkko Sakkinen
Browse files

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: 9e1b74a6 (tpm: add support for nonblocking operation)
Reported-by: default avatarJeffrin Jose T <jeffrin@rajagiritech.edu.in>
Tested-by: default avatarJeffrin Jose T <jeffrin@rajagiritech.edu.in>
Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 45477b3f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment