qcacmn: Release the platform_info spin lock before del_timer_sync

In qdf_mc_timer_stop_sync acquires the platform_info spinlock
and call's the del_tymer_sync. del_timer_sync waits for callbacks
to execute all CPU's. But callback scheduler_mc_timer_callback
tries to acquire the platform_info lock to execute. This can
lead to deadlock.

Change-Id: Ib21ee5b57e11d1c98e1308ee5318fb47d78a6ba2
CRs-Fixed: 2453603
This commit is contained in:
Bala Venkatesh
2019-05-16 13:58:49 +05:30
committed by nshrivas
parent a8a1f93112
commit 94b9ce4320

View File

@@ -745,10 +745,10 @@ QDF_STATUS qdf_mc_timer_stop(qdf_mc_timer_t *timer)
timer->state = QDF_TIMER_STATE_STOPPED;
del_timer(&(timer->platform_info.timer));
qdf_spin_unlock_irqrestore(&timer->platform_info.spinlock);
del_timer(&(timer->platform_info.timer));
qdf_try_allowing_sleep(timer->type);
return QDF_STATUS_SUCCESS;
@@ -787,9 +787,8 @@ QDF_STATUS qdf_mc_timer_stop_sync(qdf_mc_timer_t *timer)
timer->state = QDF_TIMER_STATE_STOPPED;
del_timer_sync(&(timer->platform_info.timer));
qdf_spin_unlock_irqrestore(&timer->platform_info.spinlock);
del_timer_sync(&(timer->platform_info.timer));
qdf_try_allowing_sleep(timer->type);