RDMA/cxgb4: Don't change QP state outside EP lock
authorSteve Wise <swise@opengridcomputing.com>
Tue, 10 May 2011 05:06:22 +0000 (22:06 -0700)
committerRoland Dreier <roland@purestorage.com>
Tue, 10 May 2011 05:06:22 +0000 (22:06 -0700)
commit30c95c2d495c1c8d4d6a97bb9f4e4eacb91ba1d2
treeace5f0f3da8d942bc894f8ad0fbc6ceddda1d64d
parent693d92a1bbc9e42681c42ed190bd42b636ca876f
RDMA/cxgb4: Don't change QP state outside EP lock

Concurrent ingress CLOSE and ULP ABORT operations causes a crash due
to a race condition where the close path releases the EP lock and then
tries to move the QP state to CLOSED.  This must be done inside the EP
lock to avoid the race.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/cm.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/qp.c