LFQ: Fix unpaired lock/unlock lflist
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 1 Mar 2010 20:15:19 +0000 (15:15 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 1 Mar 2010 20:15:19 +0000 (15:15 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_lfq.c

index 90587b728791d382e4c711efb6854c4cdfba811b..9560c74f138639ddf0e40f2463562ede8faee613 100644 (file)
@@ -333,8 +333,10 @@ void *dequeue(struct queue *q, bool *not_empty)
 
                if (head == tail) {
                        /* If all three are consistent, the queue is empty.  */
-                       if (!next)
+                       if (!next) {
+                               rcu_read_unlock();
                                return NULL;
+                       }
 
                        /* Help moving tail further.  */
                        uatomic_cmpxchg(&q->tail, tail, next);
This page took 0.024947 seconds and 4 git commands to generate.