Skip to contentSkip to conversation

iw_cxgb4: always wake up waiters in c4iw_peer_abort_intr().

PATCH In review Steve Wise 2 participants 4 messages Apr 27, 2012 – Apr 30, 2012 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Steve Wise

author
#0 lore raw

PATCH 1/2 iw_cxgb4: always wake up waiters in c4iw_peer_abort_intr().

This fixes a race where an ingress abort fails to wake up the thread blocked in rdma_init() causing the app to hang.

---

 drivers/infiniband/hw/cxgb4/cm.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +1 -4
index 92b4c2b..8f43143 100644
@@ -2667,11 +2667,8 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)
 
 	/*
 	 * Wake up any threads in rdma_init() or rdma_fini().
-	 * However, this is not needed if com state is just
-	 * MPA_REQ_SENT
 	 */
-	if (ep->com.state != MPA_REQ_SENT)
-		c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
+	c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
 	sched(dev, skb);
 	return 0;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20120427145915.27184.35216.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org

author
#2 lore raw

PATCH 2/2 iw_cxgb4: don't BUG_ON if we get an abort with no endpoint found.

Just log a warning.

---

 drivers/infiniband/hw/cxgb4/cm.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +4 -1
index 8f43143..3d0e40a 100644
@@ -1362,7 +1362,10 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
 
 	ep = lookup_tid(t, tid);
 	PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
-	BUG_ON(!ep);
+	if (!ep) {
+		printk(KERN_WARNING MOD "Abort rpl to freed endpoint\n");
+		return 0;
+	}
 	mutex_lock(&ep->com.mutex);
 	switch (ep->com.state) {
 	case ABORTING:

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20120427145922.27184.74574.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org

author
#4 lore raw

Re: [PATCH 2/2] iw_cxgb4: don't BUG_ON if we get an abort with no endpoint found.

Hey Roland, this patch is incorrect. It erroneously changes abort_rpl() instead of peer_abort_intr(). I will resubmit the correct patch asap.

Quoted 27 lines · Steve Wise

Just log a warning.

---

  drivers/infiniband/hw/cxgb4/cm.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +4 -2
index 8f43143..3d0e40a 100644
@@ -1362,7 +1362,10 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
 
  	ep = lookup_tid(t, tid);
  	PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
-	BUG_ON(!ep);
+	if (!ep) {
+		printk(KERN_WARNING MOD "Abort rpl to freed endpoint\n");
+		return 0;
+	}
  	mutex_lock(&ep->com.mutex);
  	switch (ep->com.state) {
  	case ABORTING:
 
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4F9EE916.9010708-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org

#6 lore raw

Re: [PATCH 2/2] iw_cxgb4: don't BUG_ON if we get an abort with no endpoint found.

Quoted 2 lines · Steve Wise

Hey Roland, this patch is incorrect.  It erroneously changes abort_rpl() instead of peer_abort_intr().  I will resubmit the correct patch asap.

OK, consider it dropped.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html