Showing error 546

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: drivers/infiniband/hw/mthca/mthca_qp.c
Line in file: 1449
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

1419        c = qp->refcount;
1420        spin_unlock_irq(&dev->qp_table.lock);
1421
1422        return c;
1423}
1424
1425void mthca_free_qp(struct mthca_dev *dev,
1426                   struct mthca_qp *qp)
1427{
1428        u8 status;
1429        struct mthca_cq *send_cq;
1430        struct mthca_cq *recv_cq;
1431
1432        send_cq = to_mcq(qp->ibqp.send_cq);
1433        recv_cq = to_mcq(qp->ibqp.recv_cq);
1434
1435        /*
1436         * Lock CQs here, so that CQ polling code can do QP lookup
1437         * without taking a lock.
1438         */
1439        mthca_lock_cqs(send_cq, recv_cq);
1440
1441        spin_lock(&dev->qp_table.lock);
1442        mthca_array_clear(&dev->qp_table.qp,
1443                          qp->qpn & (dev->limits.num_qps - 1));
1444        --qp->refcount;
1445        spin_unlock(&dev->qp_table.lock);
1446
1447        mthca_unlock_cqs(send_cq, recv_cq);
1448
1449        wait_event(qp->wait, !get_qp_refcount(dev, qp));
1450
1451        if (qp->state != IB_QPS_RESET)
1452                mthca_MODIFY_QP(dev, qp->state, IB_QPS_RESET, qp->qpn, 0,
1453                                NULL, 0, &status);
1454
1455        /*
1456         * If this is a userspace QP, the buffers, MR, CQs and so on
1457         * will be cleaned up in userspace, so all we have to do is
1458         * unref the mem-free tables and free the QPN in our table.
1459         */
Show full sources