qcacmn: Fix a double free issue for tx descriptor

Tx descriptors that belong to a particular vdev are released in
vdev detach path. Since DP soc is not detached yet, interrupts
are not disabled, so it is possible that host gets completions
for same tx descriptor and it tries to process it again.

Add a check for vdev in tx completion path to avoid duplicate
processing of tx descriptors

Change-Id: I5a62ef4d981dbfd0a5ca7483acf4270145d016be
This commit is contained in:
Pamidipati, Vijay
2018-06-13 20:13:13 +05:30
committed by nshrivas
vanhempi 118f53494f
commit 12e8f33fc6
2 muutettua tiedostoa jossa 17 lisäystä ja 0 poistoa

Näytä tiedosto

@@ -605,6 +605,8 @@ dp_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
{
TX_DESC_LOCK_LOCK(&soc->tx_desc[desc_pool_id].lock);
tx_desc->vdev = NULL;
tx_desc->nbuf = NULL;
tx_desc->flags = 0;
tx_desc->next = soc->tx_desc[desc_pool_id].freelist;
soc->tx_desc[desc_pool_id].freelist = tx_desc;