HomeFreeBSD

tcp: refactor register_tcp_functions_as_names()

Description

tcp: refactor register_tcp_functions_as_names()

Refactor register_tcp_functions_as_names() such that either all or
no (in error cases) registrations happen atomically (while holding
the tcp_function_lock write lock). Also ensure that the TCP function
block is not already registered.
This avoids situations, where some registrations were performed and
then they were removed without holding a lock in between or checking
ref counts.

Reviewed by: cc
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45947

Details

Provenance
tuexenAuthored on Jul 13 2024, 10:22 AM
Reviewer
cc
Differential Revision
D45947: tcp: refactor register_tcp_functions_as_names()
Parents
rG1f155d48f878: include: ssp: fortify <sys/socket.h>
Branches
Unknown
Tags
Unknown