diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index e72b39cbf..1bdc991e0 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2014,6 +2014,7 @@ static int srpt_compl_thread(void *arg) BUG_ON(!ch); set_current_state(TASK_INTERRUPTIBLE); + barrier(); while (ch->state < CH_LIVE) { srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD, SCST_CONTEXT_DIRECT); @@ -2026,6 +2027,7 @@ static int srpt_compl_thread(void *arg) ch->rtu_received = true; set_current_state(TASK_INTERRUPTIBLE); + barrier(); while (!ch->last_wqe_received) { srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD, SCST_CONTEXT_DIRECT);