Page MenuHomeFreeBSD

tcp: use CALLOUT_TRYLOCK for the TCP callout
ClosedPublic

Authored by glebius on Jun 26 2024, 3:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 22, 5:49 AM
Unknown Object (File)
Sat, Jan 31, 1:49 AM
Unknown Object (File)
Sun, Jan 25, 4:41 AM
Unknown Object (File)
Jan 20 2026, 12:19 PM
Unknown Object (File)
Jan 17 2026, 5:13 AM
Unknown Object (File)
Jan 14 2026, 6:04 AM
Unknown Object (File)
Jan 11 2026, 2:08 PM
Unknown Object (File)
Jan 10 2026, 8:29 PM
Subscribers

Details

Summary

This allows to remove the drop of the lock tcp_timer_enter(), which closes
a sophisticated but possible race that involves three threads. In case we
got a callout executing and two threads trying to close the connection,
e.g. and interrupt and a syscall, then lock yielding in tcp_timer_enter()
may transfer lock from one closing thread to the other closing thread,
instead of the callout.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable