From 40fe3866141aa4e675b3ad1d1a6743588c881aef Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 1 Mar 2010 15:15:19 -0500 Subject: [PATCH] LFQ: Fix unpaired lock/unlock Signed-off-by: Mathieu Desnoyers --- tests/test_urcu_lfq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_urcu_lfq.c b/tests/test_urcu_lfq.c index 90587b7..9560c74 100644 --- a/tests/test_urcu_lfq.c +++ b/tests/test_urcu_lfq.c @@ -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); -- 2.34.1