Showing error 1050

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/infiniband/hw/cxgb3/iwch_qp.c
Line in file: 836
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

 806        atomic_inc(&qhp->refcnt);
 807        spin_unlock_irqrestore(&qhp->lock, *flag);
 808
 809        /* locking heirarchy: cq lock first, then qp lock. */
 810        spin_lock_irqsave(&rchp->lock, *flag);
 811        spin_lock(&qhp->lock);
 812        cxio_flush_hw_cq(&rchp->cq);
 813        cxio_count_rcqes(&rchp->cq, &qhp->wq, &count);
 814        flushed = cxio_flush_rq(&qhp->wq, &rchp->cq, count);
 815        spin_unlock(&qhp->lock);
 816        spin_unlock_irqrestore(&rchp->lock, *flag);
 817        if (flushed)
 818                (*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context);
 819
 820        /* locking heirarchy: cq lock first, then qp lock. */
 821        spin_lock_irqsave(&schp->lock, *flag);
 822        spin_lock(&qhp->lock);
 823        cxio_flush_hw_cq(&schp->cq);
 824        cxio_count_scqes(&schp->cq, &qhp->wq, &count);
 825        flushed = cxio_flush_sq(&qhp->wq, &schp->cq, count);
 826        spin_unlock(&qhp->lock);
 827        spin_unlock_irqrestore(&schp->lock, *flag);
 828        if (flushed)
 829                (*schp->ibcq.comp_handler)(&schp->ibcq, schp->ibcq.cq_context);
 830
 831        /* deref */
 832        if (atomic_dec_and_test(&qhp->refcnt))
 833                wake_up(&qhp->wait);
 834
 835        spin_lock_irqsave(&qhp->lock, *flag);
 836}
 837
 838static void flush_qp(struct iwch_qp *qhp, unsigned long *flag)
 839{
 840        if (qhp->ibqp.uobject)
 841                cxio_set_wq_in_error(&qhp->wq);
 842        else
 843                __flush_qp(qhp, flag);
 844}
 845
 846
Show full sources