HomeFreeBSD

tcp_timers: check for (INP_TIMEWAIT | INP_DROPPED) only once

Description

tcp_timers: check for (INP_TIMEWAIT | INP_DROPPED) only once

All timers keep inpcb locked through their execution. We need to
check these flags only once. Checking for INP_TIMEWAIT earlier is
is also safer, since such inpcbs point into tcptw rather than tcpcb,
and any dereferences of inp_ppcb as tcpcb are erroneous.

Reviewed by: rrs, hselasky
Differential revision: https://reviews.freebsd.org/D32967

Details

Provenance
glebiusAuthored on Nov 10 2021, 5:22 AM
Reviewer
rrs
Differential Revision
D32967: tcp_timers: check for (INP_TIMEWAIT | INP_DROPPED) only once
Parents
rG5690261858b6: rc.d/linux: Attempt to mount only if necessary
Branches
Unknown
Tags
Unknown