git: ade05d63b727 - main - tcp: stop stack timers in tcp_switch_back_to_default()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Dec 2023 22:42:13 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ade05d63b727d5e8d0d833c1d974a9d50d4cb1bb commit ade05d63b727d5e8d0d833c1d974a9d50d4cb1bb Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2023-12-07 22:41:36 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2023-12-07 22:41:36 +0000 tcp: stop stack timers in tcp_switch_back_to_default() This funcion is an alternative code path that detaches an alternative TCP stack, missed in d2ef52ef3dee38cccb7f54d33ecc2a4b944dad9d. Reviewed by: rrs, tuexen Differential Revision: https://reviews.freebsd.org/D42917 Reported-by: syzbot+186130be9f0ca5557d4e@syzkaller.appspotmail.com Fixes: d2ef52ef3dee38cccb7f54d33ecc2a4b944dad9d --- sys/netinet/tcp_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index d951b5df938e..c79cadd04944 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -542,6 +542,9 @@ tcp_switch_back_to_default(struct tcpcb *tp) KASSERT(tp->t_fb != &tcp_def_funcblk, ("%s: called by the built-in default stack", __func__)); + if (tp->t_fb->tfb_tcp_timer_stop_all != NULL) + tp->t_fb->tfb_tcp_timer_stop_all(tp); + /* * Now, we'll find a new function block to use. * Start by trying the current user-selected