RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr()
authorSteve Wise <swise@opengridcomputing.com>
Fri, 27 Apr 2012 14:59:16 +0000 (09:59 -0500)
committerRoland Dreier <roland@purestorage.com>
Tue, 15 May 2012 16:46:04 +0000 (09:46 -0700)
This fixes a race where an ingress abort fails to wake up the thread
blocked in rdma_init() causing the app to hang.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/cm.c

index 86542cd759f629d9f7d51d096895222bd0d3fa6c..b770a044fb8a70c55079d7801c136c04754649a1 100644 (file)
@@ -2667,11 +2667,8 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)
 
        /*
         * Wake up any threads in rdma_init() or rdma_fini().
-        * However, this is not needed if com state is just
-        * MPA_REQ_SENT
         */
-       if (ep->com.state != MPA_REQ_SENT)
-               c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
+       c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
        sched(dev, skb);
        return 0;
 }