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

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

Merge "msm: ipa: fix race condition around sys->len"

parents 18209d57 314b4f55
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2966,6 +2966,7 @@ static void ipa3_wq_rx_common(struct ipa3_sys_context *sys, u32 size)
		WARN_ON(1);
		return;
	}
	spin_lock_bh(&sys->spinlock);
	rx_pkt_expected = list_first_entry(&sys->head_desc_list,
					   struct ipa3_rx_pkt_wrapper,
					   link);
@@ -2973,6 +2974,7 @@ static void ipa3_wq_rx_common(struct ipa3_sys_context *sys, u32 size)
	sys->len--;
	if (size)
		rx_pkt_expected->len = size;
	spin_unlock_bh(&sys->spinlock);
	rx_skb = rx_pkt_expected->data.skb;
	dma_unmap_single(ipa3_ctx->pdev, rx_pkt_expected->data.dma_addr,
			sys->rx_buff_sz, DMA_FROM_DEVICE);