Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd61baaf authored by Steve Wise's avatar Steve Wise Committed by Roland Dreier
Browse files

RDMA/cxgb4: Use dst parameter in import_ep()



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: default avatarSteve Wise <swise@opengridcomputing.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent d48b97b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1593,7 +1593,7 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
					n, n->dev, 0);
					n, n->dev, 0);
		if (!ep->l2t)
		if (!ep->l2t)
			goto out;
			goto out;
		ep->mtu = dst_mtu(ep->dst);
		ep->mtu = dst_mtu(dst);
		ep->tx_chan = cxgb4_port_chan(n->dev);
		ep->tx_chan = cxgb4_port_chan(n->dev);
		ep->smac_idx = (cxgb4_port_viid(n->dev) & 0x7F) << 1;
		ep->smac_idx = (cxgb4_port_viid(n->dev) & 0x7F) << 1;
		step = cdev->rdev.lldi.ntxq /
		step = cdev->rdev.lldi.ntxq /