In the Linux kernel, the following vulnerability has been resolved: tpm: flush timeout work outside buffer_mutex to avoid deadlock tpm_common_read() calls flush_work(&priv->timeout_work) under priv->buffer_mutex, but tpm_timeout_work() also takes buffer_mutex, so a running timeout work deadlocks the flush. Flush after unlocking; the timer is deleted under the lock, so no new work can be queued.
https://git.kernel.org/stable/c/d40fe462791411c471021a29385868446f29f6b3
https://git.kernel.org/stable/c/c22052a012698ce56d599d75b669d55778521c7c
https://git.kernel.org/stable/c/3a1797aa79023d44c7c7a4d8c62264e4f1cda215