Skip to contentSkip to conversation

iw_cxgb4: Drop peer_abort when no endpoint found.

PATCH In review Steve Wise 2 participants 2 messages Apr 30, 2012 – May 3, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Steve Wise

author
#0 lore raw

PATCH 1/1 iw_cxgb4: Drop peer_abort when no endpoint found.

Log a warning and drop the abort message. Otherwise we will do a bogus wake_up() and crash.

---

 drivers/infiniband/hw/cxgb4/cm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +6 -0
index 8f43143..b75d407 100644
@@ -2656,6 +2656,12 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)
 	unsigned int tid = GET_TID(req);
 
 	ep = lookup_tid(t, tid);
+	if (!ep) {
+		printk(KERN_WARNING MOD
+		       "Abort on non-existent endpoint, tid %d\n", tid);
+		kfree_skb(skb);
+		return 0;
+	}
 	if (is_neg_adv_abort(req->status)) {
 		PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep,
 		     ep->hwtid);

--
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): 20120430203129.14228.19855.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org