tcp: stop timers when in tcp_close() instead of doing that in
tcp_discardcb(). A connection in CLOSED state shall not need
any timers. Assert that no timer is rescheduled after that in tcp_timer_activate()
and verfiy that this is also the expected state in tcp_discardcb().
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Note to reviewers who did not participate in the TCP call todya. I have patch in my queue that does the same but in a different manner. Glad that Richard agrees that timers should be stopped when connection goes into TCP_CLOSED and not later. We are delaying checking in this patch or my patch due to the patch hiding a bug that we hunt. PR 276761
Agreed with all changes, but can you please split into separate commits? Cause the SACK and the timer are two different things and two different problems, although attributing to the same panic.
sys/netinet/tcp_timer.c | ||
---|---|---|
910 | I think that this assertion is correct, but it will trigger. I already don't remember clearly how to reproduce, over two weeks passed, lol :) That's why I also made this patch: https://github.com/freebsd/freebsd-src/commit/a8031493aed6adda6cee49e1c6beceaaa5c6b07a It definitely will fix triggering this assert. However, I need your review of how I treat the rest of tcpcb state. Is it ok just don't updated it when we are already CLOSED. |