[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #9880 [Tor]: Possible race closing bad_for_new_circs channels, others
#9880: Possible race closing bad_for_new_circs channels, others
------------------------+--------------------------------
Reporter: nickm | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: Tor: 0.2.4.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-relay channels
Actual Points: | Parent ID:
Points: |
------------------------+--------------------------------
Changes (by nickm):
* status: new => needs_review
Comment:
Here's the "obvious" fix. But is it right? Should it check for CLOSING
too?
{{{
diff --git a/src/or/channel.c b/src/or/channel.c
index afe28bf..d130ede 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -1297,7 +1297,8 @@ channel_closed(channel_t *chan)
/* Inform any pending (not attached) circs that they should
* give up. */
- circuit_n_chan_done(chan, 0);
+ if (chan->state != CHANNEL_STATE_OPEN)
+ circuit_n_chan_done(chan, 0);
/* Now close all the attached circuits on it. */
circuit_unlink_all_from_channel(chan, END_CIRC_REASON_CHANNEL_CLOSED);
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9880#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs