touch: synaptics_tcm: fix race condition between touch isr and resume
During touch resume for the first time, syna_tcm_identify times out when expected syna_tcm_isr does not come. ISR does not come due to previous pending ISR. Previous ISR is waiting for mutex lock mod_pool.mutex which is acquired in syna_tcm_resume function leading to deadlock till timeout. To fix this, early return from syna_tcm_isr if it is unable to acquire mod_pool.mutex. Change-Id: I18be302edfb19270014610451dda97331d78049f Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
Цей коміт міститься в:
@@ -629,7 +629,12 @@ static void syna_tcm_dispatch_report(struct syna_tcm_hcd *tcm_hcd)
|
||||
|
||||
tcm_hcd->report.id = tcm_hcd->status_report_code;
|
||||
|
||||
mutex_lock(&mod_pool.mutex);
|
||||
if (!mutex_trylock(&mod_pool.mutex)) {
|
||||
LOGI(tcm_hcd->pdev->dev.parent, "unable to acquire mod_pool.mutex\n");
|
||||
UNLOCK_BUFFER(tcm_hcd->report.buffer);
|
||||
UNLOCK_BUFFER(tcm_hcd->in);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!list_empty(&mod_pool.list)) {
|
||||
list_for_each_entry(mod_handler, &mod_pool.list, link) {
|
||||
|
Посилання в новій задачі
Заблокувати користувача