提交 b96b0404 编写于 作者: M Mike Marciniszyn 提交者: Doug Ledford

IB/hfi1: Fix potential panic with sdma drained mechanism

The guard is backwards, potentially causing the SDMA client
to panic if a wait structure was not specified.

psm and verbs are not exposed to the issue, but fix the
code just to be correct.

Fixes: a545f530 ("staging/rdma/hfi: fix CQ completion order issue")
Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 17f15bf6
......@@ -376,7 +376,7 @@ static inline void complete_tx(struct sdma_engine *sde,
sdma_txclean(sde->dd, tx);
if (complete)
(*complete)(tx, res);
if (iowait_sdma_dec(wait) && wait)
if (wait && iowait_sdma_dec(wait))
iowait_drain_wakeup(wait);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册