From d45ab8c7c3b1d7bd22d7ddee1eb8512b3ccbf92e Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Mon, 8 May 2017 16:12:02 +0530 Subject: [PATCH] qcacld-3.0: Release spinlock before returning from error While freeing ROC request nodes from the linked list a spinlock is acquired. But it is not released if the API to remove node returns failure. This will end up in a deadlock. Release spinlock before returning from error. Change-Id: I30281cc358b4827e59325554859c3dcffe6292b0 CRs-Fixed: 2042713 --- core/hdd/src/wlan_hdd_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index fa172ec39584..4f1fd76f9621 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5362,8 +5362,8 @@ static void hdd_destroy_roc_req_q(hdd_context_t *hdd_ctx) (qdf_list_node_t **) &hdd_roc_req); if (QDF_STATUS_SUCCESS != status) { - hdd_debug("unable to remove roc element from list in %s", - __func__); + qdf_spin_unlock(&hdd_ctx->hdd_roc_req_q_lock); + hdd_debug("unable to remove roc element from list"); QDF_ASSERT(0); return; }