Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 885eac23 authored by Utkarsh Saxena's avatar Utkarsh Saxena Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Add spinlock to avoid deleting already deleted list



There is a chance of deleting, already deleted list
in ipa_cleanup_wlan_rx_common_cache API.

Protect the wlan_comm_desc_list,
with the spinlock to avoid this deletion.

Change-Id: Ia05d47d7b54540eff6ef20f86dee410152457caa
Acked-by: default avatarMohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: default avatarUtkarsh Saxena <usaxena@codeaurora.org>
parent 79459f1b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1871,6 +1871,8 @@ static void ipa_cleanup_wlan_rx_common_cache(void)
	struct ipa_rx_pkt_wrapper *rx_pkt;
	struct ipa_rx_pkt_wrapper *tmp;

	spin_lock_bh(&ipa_ctx->wc_memb.wlan_spinlock);

	list_for_each_entry_safe(rx_pkt, tmp,
		&ipa_ctx->wc_memb.wlan_comm_desc_list, link) {
		list_del(&rx_pkt->link);
@@ -1891,6 +1893,8 @@ static void ipa_cleanup_wlan_rx_common_cache(void)
		IPAERR("wlan comm buff total cnt: %d\n",
			ipa_ctx->wc_memb.wlan_comm_total_cnt);

	spin_unlock_bh(&ipa_ctx->wc_memb.wlan_spinlock);

}

static void ipa_alloc_wlan_rx_common_cache(u32 size)