Unverified Commit 87bba796 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13441 RDMA/cxgb4: Added NULL check for lookup_atid

parents 0e33f34a 822a592d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1222,6 +1222,8 @@ static int act_establish(struct c4iw_dev *dev, struct sk_buff *skb)
	int ret;

	ep = lookup_atid(t, atid);
	if (!ep)
		return -EINVAL;

	pr_debug("ep %p tid %u snd_isn %u rcv_isn %u\n", ep, tid,
		 be32_to_cpu(req->snd_isn), be32_to_cpu(req->rcv_isn));
@@ -2279,6 +2281,9 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
	int ret = 0;

	ep = lookup_atid(t, atid);
	if (!ep)
		return -EINVAL;

	la = (struct sockaddr_in *)&ep->com.local_addr;
	ra = (struct sockaddr_in *)&ep->com.remote_addr;
	la6 = (struct sockaddr_in6 *)&ep->com.local_addr;