RDMA/nes: Fix use-after-free in nes_create_cq()
authorGlenn Streiff <gstreiff@neteffect.com>
Thu, 21 Feb 2008 14:17:54 +0000 (08:17 -0600)
committerRoland Dreier <rolandd@cisco.com>
Wed, 27 Feb 2008 00:24:29 +0000 (16:24 -0800)
Just delete the debugging statement so we don't use cqp_request after
freeing it.  Adrian Bunk flagged this use-after-free issue spotted by
the Coverity checker.

Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_verbs.c

index 692f0d821301c99c169eb9232146820925e57540..a651e9d9f0efdba6e38612b738f9455ccf2a1bcf 100644 (file)
@@ -1832,9 +1832,6 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
                                spin_unlock_irqrestore(&nesdev->cqp.lock, flags);
                        }
                }
-               nes_debug(NES_DBG_CQ, "iWARP CQ%u create timeout expired, major code = 0x%04X,"
-                               " minor code = 0x%04X\n",
-                               nescq->hw_cq.cq_number, cqp_request->major_code, cqp_request->minor_code);
                if (!context)
                        pci_free_consistent(nesdev->pcidev, nescq->cq_mem_size, mem,
                                        nescq->hw_cq.cq_pbase);