iw_cxgb4: put ep reference in pass_accept_req()
authorSteve Wise <swise@opengridcomputing.com>
Wed, 13 Sep 2017 16:52:32 +0000 (09:52 -0700)
committerDoug Ledford <dledford@redhat.com>
Fri, 22 Sep 2017 16:59:42 +0000 (12:59 -0400)
The listening endpoint should always be dereferenced at the end of
pass_accept_req().

Fixes: f86fac79afec ("RDMA/iw_cxgb4: atomic find and reference for listening endpoints")

Cc: stable@vger.kernel.org
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cm.c

index ceaa2fa54d322d2c9368576602a8d47e448527d0..83322dbc4711476e939f37d8c683e6aed5be5b5d 100644 (file)
@@ -2594,9 +2594,9 @@ fail:
        c4iw_put_ep(&child_ep->com);
 reject:
        reject_cr(dev, hwtid, skb);
+out:
        if (parent_ep)
                c4iw_put_ep(&parent_ep->com);
-out:
        return 0;
 }