Page MenuHomeFreeBSD

unix: Fix locking in uipc_peeraddr()
ClosedPublic

Authored by markj on Apr 27 2023, 4:58 PM.
Tags
None
Referenced Files
F115727423: D39855.diff
Sun, Apr 27, 6:44 PM
Unknown Object (File)
Sat, Apr 26, 4:03 PM
Unknown Object (File)
Fri, Apr 18, 4:45 PM
Unknown Object (File)
Feb 16 2025, 11:34 PM
Unknown Object (File)
Jan 26 2025, 5:57 PM
Unknown Object (File)
Jan 25 2025, 6:48 AM
Unknown Object (File)
Jan 24 2025, 4:03 AM
Unknown Object (File)
Jan 23 2025, 6:24 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 51245
Build 48136: arc lint + arc unit