Page MenuHomeFreeBSD

tcp_timers: check for (INP_TIMEWAIT | INP_DROPPED) only once
ClosedPublic

Authored by glebius on Nov 12 2021, 5:11 PM.
Tags
None
Referenced Files
F150653434: D32967.diff
Fri, Apr 3, 3:12 AM
Unknown Object (File)
Sat, Mar 21, 11:48 PM
Unknown Object (File)
Fri, Mar 20, 6:07 AM
Unknown Object (File)
Mon, Mar 9, 11:35 PM
Unknown Object (File)
Mon, Mar 9, 4:35 PM
Unknown Object (File)
Feb 17 2026, 2:18 AM
Unknown Object (File)
Feb 8 2026, 6:45 AM
Unknown Object (File)
Feb 8 2026, 4:38 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42759
Build 39647: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Nov 13 2021, 12:39 PM

This check is occurring lots of places and could have been factored out:

if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
        INP_WUNLOCK(inp);