]> git.baikalelectronics.ru Git - kernel.git/commit
iw_cxgb4: atomically flush the qp
authorSteve Wise <swise@opengridcomputing.com>
Thu, 9 Nov 2017 15:21:26 +0000 (07:21 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 13 Nov 2017 21:59:22 +0000 (16:59 -0500)
commitf405a23f82ccd3cd88dbdc2dd00c1ee955706404
treebf286e85ae7597e6b6bbd744491ea49631904952
parent45f21f16dd72fe5ba3ce9ddfd5e65e0a2cc8f649
iw_cxgb4: atomically flush the qp

__flush_qp() has a race condition where during the flush operation,
the qp lock is released allowing another thread to possibly post a WR,
which corrupts the queue state, possibly causing crashes.  The lock was
released to preserve the cq/qp locking hierarchy of cq first, then qp.
However releasing the qp lock is not necessary; both RQ and SQ CQ locks
can be acquired first, followed by the qp lock, and then the RQ and SQ
flushing can be done w/o unlocking.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/qp.c