]> git.itanic.dy.fi Git - linux-stable/commitdiff
RDMA/cxgb4: Use dst parameter in import_ep()
authorSteve Wise <swise@opengridcomputing.com>
Fri, 27 Apr 2012 15:24:33 +0000 (10:24 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:18:16 +0000 (15:18 +0800)
commit bd61baaf59669accae2720799394a51fecabe5d9 upstream.

Function import_ep() is incorrectly using ep->dst instead of the dst
ptr passed in.  This causes a crash when accepting new rdma connections
becase ep->dst is not initialized yet.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/cxgb4/cm.c

index 8f43143914484c7a3ff5b822cab19140b828fa9f..b770a044fb8a70c55079d7801c136c04754649a1 100644 (file)
@@ -1593,7 +1593,7 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
                                        n, n->dev, 0);
                if (!ep->l2t)
                        goto out;
-               ep->mtu = dst_mtu(ep->dst);
+               ep->mtu = dst_mtu(dst);
                ep->tx_chan = cxgb4_port_chan(n->dev);
                ep->smac_idx = (cxgb4_port_viid(n->dev) & 0x7F) << 1;
                step = cdev->rdev.lldi.ntxq /