SIGN IN SIGN UP

checklocks: copy TCP probe flags atomically

The send-buffer socket option callback stores AutoTuneSndBufDisabled
without taking the send queue mutex. CloneState must load it atomically
even while holding that mutex. Use atomic access for the copied flag and
annotate its atomic-use contract and the source-lock contract. Keep the
caller's exclusive ownership of the destination explicit.

Exercise the actual option callback and locked snapshot helper in two
goroutines. Check that the setter ran and the snapshot copied either
legal concurrent value; the old non-atomic read fails under the race
detector. The existing end-to-end probe test remains unchanged.

Assisted-by: Codex
T
Tamir Duberstein committed
4a5bb7b6038feb2c4531bdf9fb03eb993c43c9fd
Parent: 39fe408