From 07622e410825ee86af7ffe49ca31cd4ee75add49 Mon Sep 17 00:00:00 2001 From: Saket Jha Date: Wed, 25 Mar 2020 20:40:01 -0700 Subject: [PATCH] qcacmn: Fix double unmap issue in HTC misc list Add mutex protection while freeing pkts in HTC misc list to prevent double unmap of netbuf. Change-Id: I5c52324e382f8047037ca1d1a50367bc6052b737 CRs-Fixed: 2646771 --- dp/wifi3.0/dp_htt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index abbec7d09615..8721388254da 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -594,6 +594,7 @@ htt_htc_misc_pkt_pool_free(struct htt_soc *soc) struct dp_htt_htc_pkt_union *pkt, *next; qdf_nbuf_t netbuf; + HTT_TX_MUTEX_ACQUIRE(&soc->htt_tx_mutex); pkt = soc->htt_htc_pkt_misclist; while (pkt) { @@ -611,6 +612,7 @@ htt_htc_misc_pkt_pool_free(struct htt_soc *soc) pkt = next; } soc->htt_htc_pkt_misclist = NULL; + HTT_TX_MUTEX_RELEASE(&soc->htt_tx_mutex); } /*