Эх сурвалжийг харах

qcacld-3.0: Incase of error return after ol_tx_download_done_base()

In ol_tx_download_done_hl_free() when 'status !=  A_OK',
tx_desc and netbuf are freed in ol_tx_download_done_base() irrespective
of the reference count to tx_desc.
Hence return after ol_tx_download_done_base() if 'status !=  A_OK'.

Change-Id: I2e55d178abc0c2cf30d0f474962f4c06e5c8e327
CRs-Fixed: 2442568
Ajit Pal Singh 5 жил өмнө
parent
commit
cdbe69a4ad

+ 9 - 0
core/dp/txrx/ol_tx_send.c

@@ -330,6 +330,15 @@ ol_tx_download_done_hl_free(void *txrx_pdev,
 
 	ol_tx_download_done_base(pdev, status, msdu, msdu_id);
 
+	/*
+	 * Incase of error return from here since netbuf and tx_desc would
+	 * have been freed in ol_tx_download_done_base().
+	 */
+	if (status != A_OK) {
+		qdf_atomic_add(1, &pdev->tx_queue.rsrc_cnt);
+		return;
+	}
+
 	if ((tx_desc->pkt_type != OL_TX_FRM_NO_FREE) &&
 	    (tx_desc->pkt_type < OL_TXRX_MGMT_TYPE_BASE)) {
 		qdf_atomic_add(1, &pdev->tx_queue.rsrc_cnt);