HomeFreeBSD

unix: Fix locking in uipc_peeraddr()

Description

unix: Fix locking in uipc_peeraddr()

After the locking protocol changed in commit 75a67bf3d00d ("AF_UNIX:
make unix socket locking finer grained"), uipc_peeraddr() was not
updated accordingly.

The link lock now only protects global socket lists. The PCB lock is
used to protect the link between connected PCBs, so use that. Remove an
old comment which appears to be noting that unp_conn is not set for
connected SOCK_DGRAM sockets (in one direction anyway).

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39855

Details

Provenance
markjAuthored on May 3 2023, 3:56 PM
Reviewer
glebius
Differential Revision
D39855: unix: Fix locking in uipc_peeraddr()
Parents
rGfc2e2c950d97: src.conf: add WITH_TOOLCHAIN description
Branches
Unknown
Tags
Unknown