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

Commit 347dbf72 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: Add spinlock to avoid deleting already deleted list"

parents 8a9f65f1 b10627f3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2093,6 +2093,8 @@ static void ipa3_cleanup_wlan_rx_common_cache(void)
	struct ipa3_rx_pkt_wrapper *rx_pkt;
	struct ipa3_rx_pkt_wrapper *tmp;

	spin_lock_bh(&ipa3_ctx->wc_memb.wlan_spinlock);

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

	spin_unlock_bh(&ipa3_ctx->wc_memb.wlan_spinlock);

}

static void ipa3_alloc_wlan_rx_common_cache(u32 size)
@@ -2150,11 +2154,13 @@ static void ipa3_alloc_wlan_rx_common_cache(u32 size)
			goto fail_dma_mapping;
		}

		spin_lock_bh(&ipa3_ctx->wc_memb.wlan_spinlock);
		list_add_tail(&rx_pkt->link,
			&ipa3_ctx->wc_memb.wlan_comm_desc_list);
		rx_len_cached = ++ipa3_ctx->wc_memb.wlan_comm_total_cnt;

		ipa3_ctx->wc_memb.wlan_comm_free_cnt++;
		spin_unlock_bh(&ipa3_ctx->wc_memb.wlan_spinlock);

	}