summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Traudt <sirmatt@ksu.edu>2019-02-14 16:18:58 -0500
committerDavid Goulet <dgoulet@torproject.org>2019-02-14 16:19:31 -0500
commitb054a6c6b9cdda5c35b905f98ff092f15d8b749d (patch)
treea51d913aa070330e0465a318d26575457015c58e
parent6c173d00f5ecba150b1a70a68de6102428d65f51 (diff)
downloadtor-b054a6c6b9cdda5c35b905f98ff092f15d8b749d.tar.gz
tor-b054a6c6b9cdda5c35b905f98ff092f15d8b749d.zip
kist: When readding chans, check correct chan's sched_heap_idx
Closes #29508 Signed-off-by: David Goulet <dgoulet@torproject.org>
-rw-r--r--changes/bug295083
-rw-r--r--src/core/or/scheduler_kist.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/changes/bug29508 b/changes/bug29508
new file mode 100644
index 0000000000..ee728bbbc9
--- /dev/null
+++ b/changes/bug29508
@@ -0,0 +1,3 @@
+ o Minor bugfixes (scheduler):
+ - When readding channels to the pending list, check the correct channel's
+ sched_heap_idx. Fixes bug 29508; bugfix on 0.3.2.10
diff --git a/src/core/or/scheduler_kist.c b/src/core/or/scheduler_kist.c
index 34e5672074..01be751ad2 100644
--- a/src/core/or/scheduler_kist.c
+++ b/src/core/or/scheduler_kist.c
@@ -724,7 +724,7 @@ kist_scheduler_run(void)
SMARTLIST_FOREACH_BEGIN(to_readd, channel_t *, readd_chan) {
scheduler_set_channel_state(readd_chan, SCHED_CHAN_PENDING);
if (!smartlist_contains(cp, readd_chan)) {
- if (!SCHED_BUG(chan->sched_heap_idx != -1, chan)) {
+ if (!SCHED_BUG(readd_chan->sched_heap_idx != -1, readd_chan)) {
/* XXXX Note that the check above is in theory redundant with
* the smartlist_contains check. But let's make sure we're
* not messing anything up, and leave them both for now. */