summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-06-21 16:38:44 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-06-21 16:38:44 +0400
commit9fa73e091942f7420de44fa1433725a3abe960e9 (patch)
tree8dc479093cb1c70541aff8520210d925ebaa21b2
parent8f83530b83bf8b8556a797ecfe9799bbd1eb5750 (diff)
downloadaccel-ppp-9fa73e091942f7420de44fa1433725a3abe960e9.tar.gz
accel-ppp-9fa73e091942f7420de44fa1433725a3abe960e9.zip
fixed race on termination
-rw-r--r--accel-pppd/triton/triton.c2
1 files changed, 2 insertions, 0 deletions
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);
}
}