From 9fa73e091942f7420de44fa1433725a3abe960e9 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Thu, 21 Jun 2012 16:38:44 +0400 Subject: fixed race on termination --- accel-pppd/triton/triton.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accel-pppd/triton/triton.c b/accel-pppd/triton/triton.c index 02af0354..897a4ea4 100644 --- a/accel-pppd/triton/triton.c +++ b/accel-pppd/triton/triton.c @@ -374,8 +374,10 @@ void __export triton_context_unregister(struct triton_context_t *ud) spin_unlock(&ctx_list_lock); if (terminate) { + spin_lock(&threads_lock); list_for_each_entry(t, &threads, entry) triton_thread_wakeup(t); + spin_unlock(&threads_lock); } } -- cgit v1.2.3