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
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45241

(cherry picked from commit fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4)

Details

Provenance
tuexenAuthored on May 23 2024, 8:14 PM
Reviewer
glebius
Differential Revision
D45241: tcp: improve handling of setsockopt
Parents
rGe4a4ca83df2c: blackhole.4: improve man page
Branches
Unknown
Tags
Unknown