]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2017 07:47:31 +0000 (09:47 +0200)
commit 3d318605f5e32ff44fb290d9b67573b34213c4c8 upstream.

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")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/cxgb4/cm.c

index cb80e0cbbc5374952a4f6b44563caa9bcc52d9dc..ca846fbe16c442beaf37eb4fd3da96291445d8df 100644 (file)
@@ -2599,9 +2599,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;
 }