]> err.no Git - linux-2.6/commitdiff
IB/ehca: Fix improper use of yield() with spinlock held
authorHoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
Fri, 19 Jan 2007 21:50:10 +0000 (22:50 +0100)
committerRoland Dreier <rolandd@cisco.com>
Tue, 23 Jan 2007 01:03:55 +0000 (17:03 -0800)
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_cq.c

index 93995b658d94a7dedbe816f2927589a63b51dde4..6074c897f51c81a1a8da9b478eb59091ec851c96 100644 (file)
@@ -344,8 +344,11 @@ int ehca_destroy_cq(struct ib_cq *cq)
        unsigned long flags;
 
        spin_lock_irqsave(&ehca_cq_idr_lock, flags);
-       while (my_cq->nr_callbacks)
+       while (my_cq->nr_callbacks) {
+               spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
                yield();
+               spin_lock_irqsave(&ehca_cq_idr_lock, flags);
+       }
 
        idr_remove(&ehca_cq_idr, my_cq->token);
        spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);