RDMA/cxgb4: Drop peer_abort when no endpoint found
authorSteve Wise <swise@opengridcomputing.com>
Mon, 30 Apr 2012 20:31:29 +0000 (15:31 -0500)
committerRoland Dreier <roland@purestorage.com>
Tue, 15 May 2012 16:46:09 +0000 (09:46 -0700)
Log a warning and drop the abort message.  Otherwise we will do a
bogus wake_up() and crash.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/cm.c

index b770a044fb8a70c55079d7801c136c04754649a1..4c7c62fe49d34d790db67f031a18f3f6c5b9adc5 100644 (file)
@@ -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);