summaryrefslogtreecommitdiff
path: root/accel-pppd/triton
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2018-05-28 17:18:04 +0300
committerDmitry Kozlov <xeb@mail.ru>2018-05-28 17:18:04 +0300
commit03d9f8c59b6375325d7dfef0313c8c54705cfe0b (patch)
tree5fb7a872f5d94c2c33373c5535f156d7388763fb /accel-pppd/triton
parent829e5b573bb736cc17f0fbd3f680b74b5b6a4493 (diff)
downloadaccel-ppp-03d9f8c59b6375325d7dfef0313c8c54705cfe0b.tar.gz
accel-ppp-03d9f8c59b6375325d7dfef0313c8c54705cfe0b.zip
triton: fixed improper locking
Diffstat (limited to 'accel-pppd/triton')
-rw-r--r--accel-pppd/triton/triton.c4
1 files changed, 1 insertions, 3 deletions
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 {