aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2017-09-05 14:52:33 -0400
committerDoug Ledford <dledford@redhat.com>2017-09-22 12:59:42 -0400
commit3c8415cc7aff467faba25841fb859660ac14a04e (patch)
tree0c11c4638161f884dffeea6efad5a27b8da73dba
parent3d318605f5e32ff44fb290d9b67573b34213c4c8 (diff)
iw_cxgb4: drop listen destroy replies if no ep found
If the thread waiting for a CLOSE_LISTSRV_RPL times out and bails, then we need to handle a subsequent CPL if it arrives and the stid has been released. In this case silently drop it. Cc: stable@vger.kernel.org Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 83322dbc4711..19297e408820 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2333,9 +2333,14 @@ static int close_listsrv_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
2333 unsigned int stid = GET_TID(rpl); 2333 unsigned int stid = GET_TID(rpl);
2334 struct c4iw_listen_ep *ep = get_ep_from_stid(dev, stid); 2334 struct c4iw_listen_ep *ep = get_ep_from_stid(dev, stid);
2335 2335
2336 if (!ep) {
2337 pr_debug("%s stid %d lookup failure!\n", __func__, stid);
2338 goto out;
2339 }
2336 pr_debug("%s ep %p\n", __func__, ep); 2340 pr_debug("%s ep %p\n", __func__, ep);
2337 c4iw_wake_up(&ep->com.wr_wait, status2errno(rpl->status)); 2341 c4iw_wake_up(&ep->com.wr_wait, status2errno(rpl->status));
2338 c4iw_put_ep(&ep->com); 2342 c4iw_put_ep(&ep->com);
2343out:
2339 return 0; 2344 return 0;
2340} 2345}
2341 2346