From 03d9f8c59b6375325d7dfef0313c8c54705cfe0b Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 28 May 2018 17:18:04 +0300 Subject: triton: fixed improper locking --- accel-pppd/triton/triton.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'accel-pppd') diff --git a/accel-pppd/triton/triton.c b/accel-pppd/triton/triton.c index 00a93f3..d5bd01d 100644 --- a/accel-pppd/triton/triton.c +++ b/accel-pppd/triton/triton.c @@ -143,11 +143,9 @@ static void* triton_thread(struct _triton_thread_t *thread) } else { log_debug2("thread: %p: dequeued ctx %p\n", thread, thread->ctx); list_del(&thread->ctx->entry2); - spin_unlock(&threads_lock); - spin_lock(&thread->ctx->lock); thread->ctx->thread = thread; thread->ctx->queued = 0; - spin_unlock(&thread->ctx->lock); + spin_unlock(&threads_lock); __sync_sub_and_fetch(&triton_stat.context_pending, 1); } } else { -- cgit v1.2.3