CVSROOT:        /cvs
Module name:    src
Changes by:     bl...@cvs.openbsd.org   2023/08/28 08:50:02

Modified files:
        sys/dev/dt     : dt_prov_static.c 
        sys/netinet    : tcp_input.c tcp_var.h 
        sys/sys        : refcnt.h 

Log message:
Introduce reference counting for TCP syn cache entries.

The syn_cache_reaper() is a hack to serialize timeouts.  Unfortunately
it has a race and panics sometimes with pool_do_get: syncache free
list modified.  Add a reference counter for timeout and list of syn
cache entries.  Currently list refcout is not strictly necessary
due to exclusive netlock, but will be needed when we continue
unlocking.

Checking timeout_initialized() is not MP friendly, better do proper
initialization during object allocation.  Refcount in btrace helps
to find leaks.

bug reported and fix tested by Peter J. Philipp
OK claudio@

Reply via email to