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

Commit 11d814a2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB: Fix RCU lockdep splats
  IB/ipoib: Prevent hung task or softlockup processing multicast response
  IB/qib: Fix over-scheduling of QSFP work
  RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2
  RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic
  IB/qib: Don't use schedule_work()
parents c290b2f2 a493f1a2
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -216,7 +216,9 @@ static int addr4_resolve(struct sockaddr_in *src_in,

	neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->dst.dev);
	if (!neigh || !(neigh->nud_state & NUD_VALID)) {
		rcu_read_lock();
		neigh_event_send(dst_get_neighbour(&rt->dst), NULL);
		rcu_read_unlock();
		ret = -ENODATA;
		if (neigh)
			goto release;
@@ -274,15 +276,16 @@ static int addr6_resolve(struct sockaddr_in6 *src_in,
		goto put;
	}

	rcu_read_lock();
	neigh = dst_get_neighbour(dst);
	if (!neigh || !(neigh->nud_state & NUD_VALID)) {
		if (neigh)
			neigh_event_send(neigh, NULL);
		ret = -ENODATA;
		goto put;
	}

	} else {
		ret = rdma_copy_addr(addr, dst->dev, neigh->ha);
	}
	rcu_read_unlock();
put:
	dst_release(dst);
	return ret;
+4 −0
Original line number Diff line number Diff line
@@ -1375,8 +1375,10 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
		goto reject;
	}
	dst = &rt->dst;
	rcu_read_lock();
	neigh = dst_get_neighbour(dst);
	l2t = t3_l2t_get(tdev, neigh, neigh->dev);
	rcu_read_unlock();
	if (!l2t) {
		printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n",
		       __func__);
@@ -1946,10 +1948,12 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
	}
	ep->dst = &rt->dst;

	rcu_read_lock();
	neigh = dst_get_neighbour(ep->dst);

	/* get a l2t entry */
	ep->l2t = t3_l2t_get(ep->com.tdev, neigh, neigh->dev);
	rcu_read_unlock();
	if (!ep->l2t) {
		printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__);
		err = -ENOMEM;
+9 −1
Original line number Diff line number Diff line
@@ -542,8 +542,10 @@ static void send_mpa_req(struct c4iw_ep *ep, struct sk_buff *skb,
		     (mpa_rev_to_use == 2 ? MPA_ENHANCED_RDMA_CONN : 0);
	mpa->private_data_size = htons(ep->plen);
	mpa->revision = mpa_rev_to_use;
	if (mpa_rev_to_use == 1)
	if (mpa_rev_to_use == 1) {
		ep->tried_with_mpa_v1 = 1;
		ep->retry_with_mpa_v1 = 0;
	}

	if (mpa_rev_to_use == 2) {
		mpa->private_data_size +=
@@ -1594,6 +1596,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
		goto reject;
	}
	dst = &rt->dst;
	rcu_read_lock();
	neigh = dst_get_neighbour(dst);
	if (neigh->dev->flags & IFF_LOOPBACK) {
		pdev = ip_dev_find(&init_net, peer_ip);
@@ -1620,6 +1623,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
		rss_qid = dev->rdev.lldi.rxq_ids[
			  cxgb4_port_idx(neigh->dev) * step];
	}
	rcu_read_unlock();
	if (!l2t) {
		printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n",
		       __func__);
@@ -1820,6 +1824,7 @@ static int c4iw_reconnect(struct c4iw_ep *ep)
	}
	ep->dst = &rt->dst;

	rcu_read_lock();
	neigh = dst_get_neighbour(ep->dst);

	/* get a l2t entry */
@@ -1856,6 +1861,7 @@ static int c4iw_reconnect(struct c4iw_ep *ep)
		ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[
			cxgb4_port_idx(neigh->dev) * step];
	}
	rcu_read_unlock();
	if (!ep->l2t) {
		printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__);
		err = -ENOMEM;
@@ -2301,6 +2307,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
	}
	ep->dst = &rt->dst;

	rcu_read_lock();
	neigh = dst_get_neighbour(ep->dst);

	/* get a l2t entry */
@@ -2339,6 +2346,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
		ep->retry_with_mpa_v1 = 0;
		ep->tried_with_mpa_v1 = 0;
	}
	rcu_read_unlock();
	if (!ep->l2t) {
		printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__);
		err = -ENOMEM;
+1 −1
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count)
	while (ptr != cq->sw_pidx) {
		cqe = &cq->sw_queue[ptr];
		if (RQ_TYPE(cqe) && (CQE_OPCODE(cqe) != FW_RI_READ_RESP) &&
		    (CQE_QPID(cqe) == wq->rq.qid) && cqe_completes_wr(cqe, wq))
		    (CQE_QPID(cqe) == wq->sq.qid) && cqe_completes_wr(cqe, wq))
			(*count)++;
		if (++ptr == cq->size)
			ptr = 0;
+4 −2
Original line number Diff line number Diff line
@@ -1377,9 +1377,11 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
		neigh_release(neigh);
	}

	if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID)))
	if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID))) {
		rcu_read_lock();
		neigh_event_send(dst_get_neighbour(&rt->dst), NULL);

		rcu_read_unlock();
	}
	ip_rt_put(rt);
	return rc;
}
Loading