HomeFreeBSD

tcp_input: always request read-locking of PCB for any pure SYN segment.

Description

tcp_input: always request read-locking of PCB for any pure SYN segment.

This is further rework of 08d9c920275. Now we carry the knowledge of
lock type all the way through tcp_input() and also into tcp_twcheck().
Ideally the rlocking for pure SYNs should propagate all the way into
the alternative TCP stacks, but not yet today.

This should close a race when socket is bind(2)-ed but not yet
listen(2)-ed and a SYN-packet arrives racing with listen(2), discovered
recently by pho@.

Details

Provenance
glebiusAuthored on Apr 16 2021, 9:56 PM
Parents
R10:7b5053ce2296: tcp_input: remove comments and assertions about tcpbinfo locking
Branches
Unknown
Tags
Unknown