diff options
| author | Yun Park <yunp@codeaurora.org> | 2017-01-10 22:35:51 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-12 18:12:29 -0800 |
| commit | 1151316a1d21a178da0f0082a35caa6616d9905e (patch) | |
| tree | 84890c676998dbd8c2e70c1b3c72d3e6d692049c | |
| parent | f9f1e0c1c3046ddc70a8bfbb1fc4d6cc4940fd9a (diff) | |
qcacld-3.0: Fix pending_event queue corruption during driver unload
There is a possible case for pending_event queue corruption during
driver unloading, by using differnt lock between hdd_ipa_wlan_evt()
and hdd_ipa_uc_proc_pending_event().
Fix by using the same ipa_lock for pending_event queue processing.
Change-Id: If01ded0c2f7d1547b33da6401a98b6495811024d
CRs-Fixed: 1110222
| -rw-r--r-- | core/hdd/src/wlan_hdd_ipa.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 9c662b90b7ec..530bc26d4a88 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -4884,13 +4884,10 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, unsigned int pending_event_count; struct ipa_uc_pending_event *pending_event = NULL; - HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "IPA resource %s inprogress", - hdd_ipa->resource_loading ? "load":"unload"); - - hdd_err("IPA resource %s inprogress", - hdd_ipa->resource_loading ? "load":"unload"); + HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, + "IPA resource load inprogress"); - qdf_mutex_acquire(&hdd_ipa->event_lock); + qdf_mutex_acquire(&hdd_ipa->ipa_lock); pending_event_count = qdf_list_size(&hdd_ipa->pending_event); if (pending_event_count >= HDD_IPA_MAX_PENDING_EVENT_COUNT) { @@ -4906,7 +4903,7 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, if (!pending_event) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "Pending event memory alloc fail"); - qdf_mutex_release(&hdd_ipa->event_lock); + qdf_mutex_release(&hdd_ipa->ipa_lock); return -ENOMEM; } @@ -4919,7 +4916,7 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, qdf_list_insert_back(&hdd_ipa->pending_event, &pending_event->node); - qdf_mutex_release(&hdd_ipa->event_lock); + qdf_mutex_release(&hdd_ipa->ipa_lock); return 0; } else if (hdd_ipa->resource_unloading) { hdd_err("%s: IPA resource unload inprogress", __func__); |
