]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
sched: Avoid adding the same channel twice to the KIST pending list
authorDavid Goulet <dgoulet@torproject.org>
Wed, 31 Jan 2018 18:46:31 +0000 (13:46 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 31 Jan 2018 18:46:31 +0000 (13:46 -0500)
This is the quick fix that is keeping the channel in PENDING state so if we
ever try to reschedule the same channel, it won't happened.

Fixes #24700

Signed-off-by: David Goulet <dgoulet@torproject.org>
changes/bug24700 [new file with mode: 0644]
src/or/scheduler_kist.c

diff --git a/changes/bug24700 b/changes/bug24700
new file mode 100644 (file)
index 0000000..74dc581
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (scheduler, KIST):
+    - Avoid adding the same channel twice in the KIST scheduler pending list
+      wasting CPU cycles at handling the same channel twice. Fixes bug 24700;
+      bugfix on 0.3.2.1-alpha.
index f50f3aa9e91d7b2ca68754b29d3b5ae4aaafa0b0..7b5d138be1de2dd4d36c668efa41118f23f5ef1b 100644 (file)
@@ -693,7 +693,6 @@ kist_scheduler_run(void)
        * after the scheduling loop is over. They can hopefully be taken care of
        * in the next scheduling round.
        */
-      chan->scheduler_state = SCHED_CHAN_WAITING_TO_WRITE;
       if (!to_readd) {
         to_readd = smartlist_new();
       }