mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
dm: fix mutex lock issue in tpm_rbc.c
In function crb_reg_write() in tpm_rbc.c 'tpm_vdev->request_mutex' will potentially kept in locked state after crb_reg_write() returns. Tracked-On: #4108 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Yadong Qi <yadong.qi@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
parent
114fbe33f3
commit
e6e9f4da68
@ -329,12 +329,10 @@ static void crb_reg_write(struct tpm_crb_vdev *tpm_vdev, uint64_t addr, int size
|
||||
|
||||
if (pthread_cond_signal(&tpm_vdev->request_cond)) {
|
||||
DPRINTF("ERROR: Failed to wait condition\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (pthread_mutex_unlock(&tpm_vdev->request_mutex)) {
|
||||
DPRINTF("ERROR: Failed to release mutex lock\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user