HomeFreeBSD

tcp: improve inp locking in setsockopt

Description

tcp: improve inp locking in setsockopt

Ensure that the inp is not dropped when starting a stack switch.
While there, clean-up the code by using INP_WLOCK_RECHECK, which
also re-assigns tp.

Reviewed by: glebius
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45241

Details

Provenance
tuexenAuthored on May 23 2024, 8:14 PM
Reviewer
glebius
Differential Revision
D45241: tcp: improve handling of setsockopt
Parents
rG9d3df31ec06f: Merge bmake-20240520
Branches
Unknown
Tags
Unknown