tcp: stack unloading crash in rack and bbr

Its possible to induce a crash in either rack or bbr. This would be done
if the rack stack were say the default and bbr was being used by a connection.
If the bbr stack is then unloaded and it was active, we will trigger a MPASS assert
in tcp_hpts since the new stack (default rack) would start a timer, and the old stack
(bbr) would have the inp already in hpts.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D39576
This commit is contained in:
Randall Stewart 2023-04-14 15:42:23 -04:00
parent 5dbd073b04
commit 3cc7b66732
2 changed files with 6 additions and 0 deletions

View File

@ -9854,6 +9854,9 @@ bbr_stop_all_timers(struct tcpcb *tp, struct tcp_bbr *bbr)
/* We enter in persists, set the flag appropriately */
bbr->rc_in_persist = 1;
}
if (tcp_in_hpts(bbr->rc_inp)) {
tcp_hpts_remove(bbr->rc_inp);
}
}
static void

View File

@ -8113,6 +8113,9 @@ rack_stop_all_timers(struct tcpcb *tp, struct tcp_rack *rack)
/* We enter in persists, set the flag appropriately */
rack->rc_in_persist = 1;
}
if (tcp_in_hpts(rack->rc_inp)) {
tcp_hpts_remove(rack->rc_inp);
}
}
static void