Browse Source

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
Nachiket Kukade 8 years ago
parent
commit
d45ab8c7c3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/hdd/src/wlan_hdd_main.c

+ 2 - 2
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;
 		}