Page MenuHomeFreeBSD

D46143.diff
No OneTemporary

D46143.diff

diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -2259,11 +2259,20 @@
KASSERT((tp->t_fb->tfb_flags & TCP_FUNC_BEING_REMOVED) == 0,
("tcp_newtcpcb: using TFB being removed"));
rw_runlock(&tcp_function_lock);
- /*
- * Use the current system default CC algorithm.
- */
- cc_attach(tp, CC_DEFAULT_ALGO());
-
+ CC_LIST_RLOCK();
+ if (listening_tcb != NULL) {
+ if (CC_ALGO(listening_tcb)->flags & CC_MODULE_BEING_REMOVED) {
+ CC_LIST_RUNLOCK();
+ if (tp->t_fb->tfb_tcp_fb_fini)
+ (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1);
+ refcount_release(&tp->t_fb->tfb_refcnt);
+ return (NULL);
+ }
+ CC_ALGO(tp) = CC_ALGO(listening_tcb);
+ } else
+ CC_ALGO(tp) = CC_DEFAULT_ALGO();
+ cc_refer(CC_ALGO(tp));
+ CC_LIST_RUNLOCK();
if (CC_ALGO(tp)->cb_init != NULL)
if (CC_ALGO(tp)->cb_init(&tp->t_ccv, NULL) > 0) {
cc_detach(tp);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 3:52 PM (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14660916
Default Alt Text
D46143.diff (915 B)

Event Timeline