From 7695e3d2eacd17f0753df99d5b1cf62df8b65367 Mon Sep 17 00:00:00 2001 From: Tony Truong Date: Mon, 11 Jan 2016 15:20:56 -0800 Subject: [PATCH] mhi: core: Fix race condition on poll_inbound Fix race condition in mhi_poll_inbound which could leave the bounce buffer list and TRE list out of sync. Change-Id: I76c7de75256b59f8a0dff2a85af733c441761385 Signed-off-by: Andrei Danaila Signed-off-by: Tony Truong --- drivers/platform/msm/mhi/mhi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/msm/mhi/mhi_main.c b/drivers/platform/msm/mhi/mhi_main.c index b8e0a4446a25..c949745f5af7 100644 --- a/drivers/platform/msm/mhi/mhi_main.c +++ b/drivers/platform/msm/mhi/mhi_main.c @@ -1499,7 +1499,7 @@ int mhi_poll_inbound(struct mhi_client_handle *client_handle, bb_ctxt = &mhi_dev_ctxt->chan_bb_list[chan]; mutex_lock(chan_mutex); - if (local_chan_ctxt->rp != local_chan_ctxt->ack_rp) { + if (bb_ctxt->rp != bb_ctxt->ack_rp) { pending_trb = (struct mhi_tx_pkt *)(local_chan_ctxt->ack_rp); result->flags = pending_trb->info; bb = bb_ctxt->ack_rp;