Page MenuHomeFreeBSD

unix: Fix locking in uipc_peeraddr()
ClosedPublic

Authored by markj on Apr 27 2023, 4:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 2:29 PM
Unknown Object (File)
Sat, Nov 2, 9:46 AM
Unknown Object (File)
Thu, Oct 31, 12:13 PM
Unknown Object (File)
Sun, Oct 20, 11:55 PM
Unknown Object (File)
Oct 4 2024, 11:19 PM
Unknown Object (File)
Oct 2 2024, 6:56 PM
Unknown Object (File)
Oct 1 2024, 1:19 PM
Unknown Object (File)
Sep 29 2024, 11:29 PM
Subscribers

Details

Summary

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).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable